#include<bits/stdc++.h>
using namespace std;
int main() {
char a[300000];
int x=0;
while(a[x]!='E'){
cin>>a[x];
if(a[x]=='E'){
break;
}
x++;
}
if(strlen(a)==1){
cout<<"0:0"<<endl<<endl<<"0:0";
return 0;
}
int temp1=0,temp2=0,cs=0;
for(int i=0;i<x;i++){
if(a[i]=='W'){
temp1++;
}
else{
temp2++;
}
if((temp1>=11 || temp2>=11) && abs(temp1-temp2)>=2){
cout<<temp1<<":"<<temp2<<endl;
temp1=0;
temp2=0;
}
else if(i==x-1){
cout<<temp1<<":"<<temp2<<endl;
temp1=0;
temp2=0;
}
}
cout<<endl;
for(int i=0;i<x;i++){
if(a[i]=='W'){
temp1++;
}
else{
temp2++;
}
if((temp1>=21 || temp2>=21) && abs(temp1-temp2)>=2){
cout<<temp1<<":"<<temp2<<endl;
temp1=0;
temp2=0;
}
else if(i==x-1){
cout<<temp1<<":"<<temp2<<endl;
temp1=0;
temp2=0;
}
}
}