#include<bits/stdc++.h>
using namespace std;
string s;
char c;
int a1,b1;
int a2,b2;
int main()
{
while(true)
{
cin>>c;
if(c=='E') break;
s+=c;
}
int n=s.size();
if(n==0) cout<<"0:0\n\n0:0";
for(int i=0;i<n;i++)
{
if(s[i]=='W') a1++;
else b1++;
if(abs(a1-b1)>=2&&max(a1,b1)>=11)
{
cout<<a1<<":"<<b1<<endl;
a1=0;
b1=0;
}
}
if(a1!=0||b1!=0) cout<<a1<<":"<<b1<<endl;
cout<<endl;
for(int i=0;i<n;i++)
{
if(s[i]=='W') a2++;
else b2++;
if(abs(a2-b2)>=2&&max(a2,b2)>=21)
{
cout<<a2<<":"<<b2<<endl;
a2=0;
b2=0;
}
}
if(a2!=0||b2!=0) cout<<a2<<":"<<b2<<endl;
return 0;
}
rt