from itertools import*

s=(len(list(t))for _,t in groupby(eval(input())))

for r,l in zip(s,s):t=-~r//2+l//2;print((*[0]*~-r+[t,r+l-t]+[0]*~-l))
d=[i+(c>'L'or-1)for i,c in enumerate(eval(input()))]

exec('d=[d[i]for i in d];'*19)

a=[0]*len(d)

for i in d:a[i]+=1

print((*a))
from itertools import *

s = (len(list(t)) for _, t in groupby(eval(input())))
for r, l in zip(s, s):
    t = -~r // 2 + l // 2
    print((*[0] * ~-r + [t, r + l - t] + [0] * ~-l))

d = [i + (c > "L" or -1) for i, c in enumerate(eval(input()))]
exec("d=[d[i]for i in d];" * 19)
a = [0] * len(d)
for i in d:
    a[i] += 1
print((*a))

-from itertools import * - -s = (len(list(t)) for _, t in groupby(eval(input()))) -for r, l in zip(s, s): -    t = -~r // 2 + l // 2 -    print((*[0] * ~-r + [t, r + l - t] + [0] * ~-l)) +d = [i + (c > "L" or -1) for i, c in enumerate(eval(input()))] +exec("d=[d[i]for i in d];" * 19) +a = [0] * len(d) +for i in d: +    a[i] += 1 +print((*a))