S = eval(input())

result = [1]*len(S)

 

for i,x in enumerate(S):

    if x == "R":

        move_To = S.find("L", i)-1

        result[i] -= 1

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

            result[move_To] += 1

        else:

            result[move_To+1] += 1

    else:

        move_To = S.rfind("R", 0, i+1) + 1

        result[i] -= 1

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

            result[move_To] += 1

        else:

            result[move_To-1] += 1

 

print((" ".join(map(str,result))))
"""

各人についての移動回数

偶数 -> 状態同じ

奇数 -> 一回移動

"""

S = [False if s == "L" else True for s in eval(input())]

N = len(S)



from collections import deque



F_idx = deque([idx for idx in range(N) if not S[idx]])

T_idx = deque([idx for idx in range(N) if S[idx]])



state = [0] * N

# ->

for i in range(N):

    if S[i]:

        if (F_idx[0] - i) % 2 == 0:

            state[F_idx[0]] += 1

        else:

            state[F_idx[0] - 1] += 1

    if i == F_idx[0]:

        F_idx.popleft()



# <-

for i in range(N-1,-1,-1):

    if not S[i]:

        if abs(T_idx[-1] - i) % 2 == 0:

            state[T_idx[-1]] += 1

        else:

            state[T_idx[-1] + 1] += 1

    if i == T_idx[-1]:

        T_idx.pop()



print((*state))
S = eval(input())
result = [1] * len(S)
for i, x in enumerate(S):
    if x == "R":
        move_To = S.find("L", i) - 1
        result[i] -= 1
        if (move_To - i) % 2 == 0:
            result[move_To] += 1
        else:
            result[move_To + 1] += 1
    else:
        move_To = S.rfind("R", 0, i + 1) + 1
        result[i] -= 1
        if (i - move_To) % 2 == 0:
            result[move_To] += 1
        else:
            result[move_To - 1] += 1
print((" ".join(map(str, result))))

"""
各人についての移動回数
偶数 -> 状態同じ
奇数 -> 一回移動
"""
S = [False if s == "L" else True for s in eval(input())]
N = len(S)
from collections import deque

F_idx = deque([idx for idx in range(N) if not S[idx]])
T_idx = deque([idx for idx in range(N) if S[idx]])
state = [0] * N
# ->
for i in range(N):
    if S[i]:
        if (F_idx[0] - i) % 2 == 0:
            state[F_idx[0]] += 1
        else:
            state[F_idx[0] - 1] += 1
    if i == F_idx[0]:
        F_idx.popleft()
# <-
for i in range(N - 1, -1, -1):
    if not S[i]:
        if abs(T_idx[-1] - i) % 2 == 0:
            state[T_idx[-1]] += 1
        else:
            state[T_idx[-1] + 1] += 1
    if i == T_idx[-1]:
        T_idx.pop()
print((*state))

-S = eval(input()) -result = [1] * len(S) -for i, x in enumerate(S): -    if x == "R": -        move_To = S.find("L", i) - 1 -        result[i] -= 1 -        if (move_To - i) % 2 == 0: -            result[move_To] += 1 +""" +各人についての移動回数 +偶数 -> 状態同じ +奇数 -> 一回移動 +""" +S = [False if s == "L" else True for s in eval(input())] +N = len(S) +from collections import deque + +F_idx = deque([idx for idx in range(N) if not S[idx]]) +T_idx = deque([idx for idx in range(N) if S[idx]]) +state = [0] * N +# -> +for i in range(N): +    if S[i]: +        if (F_idx[0] - i) % 2 == 0: +            state[F_idx[0]] += 1 -            result[move_To + 1] += 1 -    else: -        move_To = S.rfind("R", 0, i + 1) + 1 -        result[i] -= 1 -        if (i - move_To) % 2 == 0: -            result[move_To] += 1 +            state[F_idx[0] - 1] += 1 +    if i == F_idx[0]: +        F_idx.popleft() +# <- +for i in range(N - 1, -1, -1): +    if not S[i]: +        if abs(T_idx[-1] - i) % 2 == 0: +            state[T_idx[-1]] += 1 -            result[move_To - 1] += 1 -print((" ".join(map(str, result)))) +            state[T_idx[-1] + 1] += 1 +    if i == T_idx[-1]: +        T_idx.pop() +print((*state))