#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
char a[200001];
int len = 0;
char c;
int win;
int lose;
int main()
{
while (1) {
c = getchar();
if (c == 'E') {
break;
}
len++;
a[len] = c;
}
int i = 1;
win = 0, lose = 0;
while (i <= len) {
if (a[i] == 'W') win++;
if (a[i] == 'L') lose++;
if ((win >= 11 or lose >= 11)and(abs(win-lose) >= 2)) {
printf("%d:%d\n", win, lose);
win = lose = 0;
}
i++;
}
if ((win > 0 or lose > 0)and(not((win >= 11 or lose >= 11)and(abs(win-lose) >= 2)))) {
printf("%d:%d\n", win, lose);
win = lose = 0;
}
cout << endl;
i = 1;
while (i <= len) {
if (a[i] == 'W') win++;
if (a[i] == 'L') lose++;
if ((win >= 21 or lose >= 21)and(abs(win-lose) >= 2)) {
printf("%d:%d\n", win, lose);
win = lose = 0;
}
i++;
}
if ((win > 0 or lose > 0)and(not((win >= 21 or lose >= 21)and(abs(win-lose) >= 2)))) {
printf("%d:%d\n", win, lose);
win = lose = 0;
}
return 0;
}