from bisect import bisect



S = eval(input())

N = len(S)

r_idx = [i for i in range(N) if S[i] == 'R']

l_idx = [i for i in range(N) if S[i] == 'L']



ans = [0] * N

for i in range(N):

    if S[i] == 'R':

        j = l_idx[bisect(l_idx, i)]

        if (j - i) % 2 == 0:

            ans[j] += 1

        else:

            ans[j - 1] += 1

    else:

        j = r_idx[max(0, bisect(r_idx, i) - 1)]

        if (i - j) % 2 == 0:

            ans[j] += 1

        else:

            ans[j + 1] += 1

            

print((*ans))

S = eval(input())



n = len(S)

x = [1] * n

for i in range(n):

    if S[i] == "R" and S[i + 1] == "R":

        x[i + 2] += x[i]

        x[i] = 0



for i in reversed(list(range(n))):

    if S[i] == "L" and S[i - 1] == "L":

        x[i - 2] += x[i]

        x[i] = 0

            

print((*x))

from bisect import bisect

S = eval(input())
N = len(S)
r_idx = [i for i in range(N) if S[i] == "R"]
l_idx = [i for i in range(N) if S[i] == "L"]
ans = [0] * N
for i in range(N):
    if S[i] == "R":
        j = l_idx[bisect(l_idx, i)]
        if (j - i) % 2 == 0:
            ans[j] += 1
        else:
            ans[j - 1] += 1
    else:
        j = r_idx[max(0, bisect(r_idx, i) - 1)]
        if (i - j) % 2 == 0:
            ans[j] += 1
        else:
            ans[j + 1] += 1
print((*ans))

S = eval(input())
n = len(S)
x = [1] * n
for i in range(n):
    if S[i] == "R" and S[i + 1] == "R":
        x[i + 2] += x[i]
        x[i] = 0
for i in reversed(list(range(n))):
    if S[i] == "L" and S[i - 1] == "L":
        x[i - 2] += x[i]
        x[i] = 0
print((*x))

-from bisect import bisect - -N = len(S) -r_idx = [i for i in range(N) if S[i] == "R"] -l_idx = [i for i in range(N) if S[i] == "L"] -ans = [0] * N -for i in range(N): -    if S[i] == "R": -        j = l_idx[bisect(l_idx, i)] -        if (j - i) % 2 == 0: -            ans[j] += 1 -        else: -            ans[j - 1] += 1 -    else: -        j = r_idx[max(0, bisect(r_idx, i) - 1)] -        if (i - j) % 2 == 0: -            ans[j] += 1 -        else: -            ans[j + 1] += 1 -print((*ans)) +n = len(S) +x = [1] * n +for i in range(n): +    if S[i] == "R" and S[i + 1] == "R": +        x[i + 2] += x[i] +        x[i] = 0 +for i in reversed(list(range(n))): +    if S[i] == "L" and S[i - 1] == "L": +        x[i - 2] += x[i] +        x[i] = 0 +print((*x))