#include<iostream>
using namespace std;
void inputIn(char *score ,int &number);
void caculate(char *score,int number);
int main(){
char score[62500];
int number;
inputIn(score,number);
caculate(score,number);
return 0;
}
void inputIn(char *score,int &number){
int i=0;
char c;
cin>>c;
while(c!='E'){
score[i]=c;
i++;
cin>>c;
}
number=i;
}
void caculate(char *score,int number){
int playerW=0;
int playerL=0;
for(int i=0;i<number;i++){
if(score[i]=='W'){
playerW++;
if(playerW>=11&&playerW-playerL>=2){
cout<<playerW<<':'<<playerL<<endl;
playerW=0;
playerL=0;
}
}
else if(score[i]=='L'){
playerL++;
if(playerL>=11&&playerL-playerW>=2){
cout<<playerW<<':'<<playerL<<endl;
playerW=0;
playerL=0;
}
}
}
if(playerW!=0&&playerL!=0){
cout<<playerW<<':'<<playerL<<endl;
}
cout<<endl;
playerW=0;
playerL=0;
for(int i=0;i<number;i++){
if(score[i]=='W'){
playerW++;
if(playerW>=21&&playerW-playerL>=2){
cout<<playerW<<':'<<playerL<<endl;
playerW=0;
playerL=0;
}
}
else if(score[i]=='L'){
playerL++;
if(playerL>=21&&playerL-playerW>=2){
cout<<playerW<<':'<<playerL<<endl;
playerW=0;
playerL=0;
}
}
}
if(playerW!=0&&playerL!=0){
cout<<playerW<<':'<<playerL<<endl;
}
}