import sys, heapq



S = list(eval(input()))

N = len(S)



res = [0] * len(S)



i = 0

while i < len(S):

    s = S[i]

    h = i

    cntR = 0

    cntL = 0

    while s == "R":

        i += 1

        cntR += 1

        s = S[i]

    tmp = i

    res[tmp] += cntR // 2

    res[tmp - 1] += cntR // 2 + int(cntR % 2 == 1)

    while s == "L":

        i += 1

        cntL += 1

        if i < N:

            s = S[i]

        else:

            break

    res[tmp] += cntL // 2 + int(cntL % 2 == 1)

    res[tmp - 1] += cntL // 2



print((*res))
S = eval(input())

res = [0] * len(S)



childlen = 0

for i in range(len(S)):

    if S[i] == "R":

        childlen += 1

    else:

        tmp = (childlen + int(childlen % 2 == 1)) // 2

        res[i - 1] += tmp

        res[i] += childlen - tmp

        # print(i, tmp, childlen, res[i - 1], res[i])

        childlen = 0



for i in reversed(list(range(len(S)))):

    if S[i] == "L":

        childlen += 1

    else:

        tmp = (childlen + int(childlen % 2 == 1)) // 2

        res[i + 1] += tmp

        res[i] += childlen - tmp

        childlen = 0



print((*res))
import sys, heapq

S = list(eval(input()))
N = len(S)
res = [0] * len(S)
i = 0
while i < len(S):
    s = S[i]
    h = i
    cntR = 0
    cntL = 0
    while s == "R":
        i += 1
        cntR += 1
        s = S[i]
    tmp = i
    res[tmp] += cntR // 2
    res[tmp - 1] += cntR // 2 + int(cntR % 2 == 1)
    while s == "L":
        i += 1
        cntL += 1
        if i < N:
            s = S[i]
        else:
            break
    res[tmp] += cntL // 2 + int(cntL % 2 == 1)
    res[tmp - 1] += cntL // 2
print((*res))

S = eval(input())
res = [0] * len(S)
childlen = 0
for i in range(len(S)):
    if S[i] == "R":
        childlen += 1
    else:
        tmp = (childlen + int(childlen % 2 == 1)) // 2
        res[i - 1] += tmp
        res[i] += childlen - tmp
        # print(i, tmp, childlen, res[i - 1], res[i])
        childlen = 0
for i in reversed(list(range(len(S)))):
    if S[i] == "L":
        childlen += 1
    else:
        tmp = (childlen + int(childlen % 2 == 1)) // 2
        res[i + 1] += tmp
        res[i] += childlen - tmp
        childlen = 0
print((*res))

-import sys, heapq - -S = list(eval(input())) -N = len(S) +S = eval(input()) -i = 0 -while i < len(S): -    s = S[i] -    h = i -    cntR = 0 -    cntL = 0 -    while s == "R": -        i += 1 -        cntR += 1 -        s = S[i] -    tmp = i -    res[tmp] += cntR // 2 -    res[tmp - 1] += cntR // 2 + int(cntR % 2 == 1) -    while s == "L": -        i += 1 -        cntL += 1 -        if i < N: -            s = S[i] -        else: -            break -    res[tmp] += cntL // 2 + int(cntL % 2 == 1) -    res[tmp - 1] += cntL // 2 +childlen = 0 +for i in range(len(S)): +    if S[i] == "R": +        childlen += 1 +    else: +        tmp = (childlen + int(childlen % 2 == 1)) // 2 +        res[i - 1] += tmp +        res[i] += childlen - tmp +        # print(i, tmp, childlen, res[i - 1], res[i]) +        childlen = 0 +for i in reversed(list(range(len(S)))): +    if S[i] == "L": +        childlen += 1 +    else: +        tmp = (childlen + int(childlen % 2 == 1)) // 2 +        res[i + 1] += tmp +        res[i] += childlen - tmp +        childlen = 0