import numpy as np



S = eval(input())

N = len(S)

move = 10 ** 100



U = N + 1

D = move.bit_length()



dbl = np.zeros((D, U), dtype=int)

for i, s in enumerate(S, start=1):

    if s == "R":

        dbl[0, i] = i + 1

    else:

        dbl[0, i] = i - 1



for h in range(D - 1):

    dbl[h + 1] = dbl[h, dbl[h]]



child = np.arange(1, N + 1)

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

    if move & (1 << i):

        child = dbl[i, child]



ans = np.bincount(child, minlength=N + 1)

print((*ans[1:]))
def RunLengthEncoding(S):

    res = []

    N = len(S)

    i = 0

    while i < N:

        cnt = 1

        while i < N - 1 and S[i] == S[i + 1]:

            cnt += 1

            i += 1

        res.append((S[i], cnt))

        i += 1

    return res





S = eval(input())

N = len(S)

rle = RunLengthEncoding(S)



goal = []

for i, (l, r) in enumerate(zip(S[:-1], S[1:])):

    if l == "R" and r == "L":

        goal.append(i)



ans = [0] * N



p = 0

for i in range(0, len(rle), 2):

    _, nl = rle[i]

    _, nr = rle[i+1]

    g = goal[i//2]

    ans[g] += (nl + 1) // 2

    ans[g+1] += nl // 2

    ans[g+1] += (nr + 1) // 2

    ans[g] += nr // 2



print((*ans))
import numpy as np

S = eval(input())
N = len(S)
move = 10**100
U = N + 1
D = move.bit_length()
dbl = np.zeros((D, U), dtype=int)
for i, s in enumerate(S, start=1):
    if s == "R":
        dbl[0, i] = i + 1
    else:
        dbl[0, i] = i - 1
for h in range(D - 1):
    dbl[h + 1] = dbl[h, dbl[h]]
child = np.arange(1, N + 1)
for i in reversed(list(range(D))):
    if move & (1 << i):
        child = dbl[i, child]
ans = np.bincount(child, minlength=N + 1)
print((*ans[1:]))

def RunLengthEncoding(S):
    res = []
    N = len(S)
    i = 0
    while i < N:
        cnt = 1
        while i < N - 1 and S[i] == S[i + 1]:
            cnt += 1
            i += 1
        res.append((S[i], cnt))
        i += 1
    return res


S = eval(input())
N = len(S)
rle = RunLengthEncoding(S)
goal = []
for i, (l, r) in enumerate(zip(S[:-1], S[1:])):
    if l == "R" and r == "L":
        goal.append(i)
ans = [0] * N
p = 0
for i in range(0, len(rle), 2):
    _, nl = rle[i]
    _, nr = rle[i + 1]
    g = goal[i // 2]
    ans[g] += (nl + 1) // 2
    ans[g + 1] += nl // 2
    ans[g + 1] += (nr + 1) // 2
    ans[g] += nr // 2
print((*ans))

-import numpy as np +def RunLengthEncoding(S): +    res = [] +    N = len(S) +    i = 0 +    while i < N: +        cnt = 1 +        while i < N - 1 and S[i] == S[i + 1]: +            cnt += 1 +            i += 1 +        res.append((S[i], cnt)) +        i += 1 +    return res + -move = 10**100 -U = N + 1 -D = move.bit_length() -dbl = np.zeros((D, U), dtype=int) -for i, s in enumerate(S, start=1): -    if s == "R": -        dbl[0, i] = i + 1 -    else: -        dbl[0, i] = i - 1 -for h in range(D - 1): -    dbl[h + 1] = dbl[h, dbl[h]] -child = np.arange(1, N + 1) -for i in reversed(list(range(D))): -    if move & (1 << i): -        child = dbl[i, child] -ans = np.bincount(child, minlength=N + 1) -print((*ans[1:])) +rle = RunLengthEncoding(S) +goal = [] +for i, (l, r) in enumerate(zip(S[:-1], S[1:])): +    if l == "R" and r == "L": +        goal.append(i) +ans = [0] * N +p = 0 +for i in range(0, len(rle), 2): +    _, nl = rle[i] +    _, nr = rle[i + 1] +    g = goal[i // 2] +    ans[g] += (nl + 1) // 2 +    ans[g + 1] += nl // 2 +    ans[g + 1] += (nr + 1) // 2 +    ans[g] += nr // 2 +print((*ans))