#include <iostream>
#include <cstring>
using namespace std;
void jisuan(string d, int s){
int a = 0, b = 0;
for(auto x:d){
if(x == 'W') a++;
else b++;
if(max(a, b) >= s && abs(a - b) >= 2){
printf("%d:%d\n", a, b);
a = 0;
b = 0;
}
}
printf("%d:%d\n", a, b);
}
int main(){
string data = "";
char t;
while (true){
cin >> t;
if(t == 'E') break;
data += t;
}
jisuan(data, 11);
cout << endl;
jisuan(data, 21);
return 0;
}