#include<bits/stdc++.h>
using namespace std;
struct R
{
int ll, rr;
}R1[10005],R2[10005];
int main(int argc, char* argv[])
{
string s;
int l1 = 0, l2 = 0, r1 = 0, r2 = 0;
int c1 = 0, c2 = 0;
while (cin >> s)
{
int len = s.length();
int i;
for (i = 0; i < len; i)
{
if (s[i] == 'W')
{
l1; l2++;
}
else if (s[i] == 'L')
{
r1++; r2++;
}
else break;
//分差大于或者等于 2
if ((l1 >= 11 || r1 >= 11) && abs(l1 - r1) >= 2)
{
R1[c1].ll = l1;
R1[c1].rr = r1;
c1++;
l1 = r1 = 0;
}
if ((l2 >= 21 || r2 >= 21) && abs(l2 - r2) >= 2)
{
R2[c2].ll = l2;
R2[c2].rr = r2;
c2++;
l2 = r2 = 0;
}
}
if (s[i] == 'E')
{
R1[c1].ll = l1;
R1[c1].rr = r1;
c1++;
}