s = input()

n = len(s)

ans  =[0 for i in range(n)]

i = 0

while i < n:

    le = i

    while i+1 < n and s[i] == s[i+1]:

        i += 1

    length = i - le + 1

    if s[i] == 'L':

        ans[le]+=(length+1)//2

        ans[le-1] += length//2

    else:

        ans[i] += (length+1)//2

        ans[i+1] += length//2

    i += 1



for i in range(n):

    print(ans[i],end=' ')



print()

s = eval(input())

n = len(s)

ans  =[0 for i in range(n)]

i = 0

while i < n:

    le = i

    while i+1 < n and s[i] == s[i+1]:

        i += 1

    length = i - le + 1

    if s[i] == 'L':

        ans[le]+=(length+1)//2

        ans[le-1] += length//2

    else:

        ans[i] += (length+1)//2

        ans[i+1] += length//2

    i += 1



print((*ans))
s = input()
n = len(s)
ans = [0 for i in range(n)]
i = 0
while i < n:
    le = i
    while i + 1 < n and s[i] == s[i + 1]:
        i += 1
    length = i - le + 1
    if s[i] == "L":
        ans[le] += (length + 1) // 2
        ans[le - 1] += length // 2
    else:
        ans[i] += (length + 1) // 2
        ans[i + 1] += length // 2
    i += 1
for i in range(n):
    print(ans[i], end=" ")
print()

s = eval(input())
n = len(s)
ans = [0 for i in range(n)]
i = 0
while i < n:
    le = i
    while i + 1 < n and s[i] == s[i + 1]:
        i += 1
    length = i - le + 1
    if s[i] == "L":
        ans[le] += (length + 1) // 2
        ans[le - 1] += length // 2
    else:
        ans[i] += (length + 1) // 2
        ans[i + 1] += length // 2
    i += 1
print((*ans))

-s = input() +s = eval(input()) -for i in range(n): -    print(ans[i], end=" ") -print() +print((*ans))