#include<bits/stdc++.h>
using namespace std;

//string a,b;
long long me,you;
char a[100000];

int main()
{
//	getline(cin,a);
//	if(a.length() == 20)
//	{
//		FLAG:
//		getline(cin,b);
//		if(b.length() == 20)
//		{
//			a += b;
//			goto FLAG;
//		}
//		else
//		{
//			a += b;
//		}
//	}
	for(int i = 0;;i++)
	{
		cin >> a[i];
		if(a[i] == 'E')
		{
			break;
		}
	}
	long long a_length = strlen(a);
	
	for(int i = 0; i < a_length; i++)
	{
		if(a[i] == 'E')
		{
			cout << me << ":" << you << endl;
			if((me == 11 && abs(me-you) >= 2)|| (you == 11 && abs(me-you) >= 2))
			{
				cout << "0:0" << endl;
			}
			break;
		}
		else if(me >= 11 || you >= 11)
		{
			if(abs(me-you) >= 2)
			{
				cout << me << ":" << you << endl;
				me = 0;
				you = 0;
			}
		}
		if(a[i] == 'W')
		{
			me++;
		}
		else if(a[i] == 'L')
		{
			you++;
		}
	}
	
	me = 0;
	you = 0;
	
	for(int i = 0; i < a_length; i++)
	{
		if(a[i] == 'E')
		{
			cout << me << ":" << you << endl;
			if((me == 21 && abs(me-you) >= 2)|| (you == 21 && abs(me-you) >= 2))
			{
				cout << "0:0" << endl;
			}
			break;
		}
		else if(me >= 21 || you >= 21)
		{
			if(abs(me-you) >= 2)
			{
				cout << me << ":" << you << endl;
				me = 0;
				you = 0;
			}
		}
		if(a[i] == 'W')
		{
			me++;
		}
		else if(a[i] == 'L')
		{
			you++;
		}
	}

	return 0;
}

2 comments

  • 1