def agg(li):

    LEN = len(li)

    agged = [0] * 2

    if LEN % 2:

        agged[0] = (LEN + 1) // 2

        agged[1] = LEN // 2

    else:

        agged[0] = agged[1] = LEN // 2

    for i in range(LEN - 1):

        if li[i + 1] != li[i]:

            if i % 2:

                return [0] * i + agged[::-1] + [0] * (LEN - i - 2)

            else:

                return [0] * i + agged + [0] * (LEN - i - 2)

    return





S = eval(input())

N = len(S)



ans = []

chunk = [S[0]]

for i in range(N - 1):

    if S[i] == 'L' and S[i + 1] == 'R':

        ans += agg(chunk)

        chunk = [S[i + 1]]

    else:

        chunk.append(S[i + 1])

ans += agg(chunk)

print((' '.join(map(str, ans))))

S = eval(input())

N = len(S)

divs = [0]

for i in range(N - 1):

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

        divs.append(i + 1)

divs.append(N)

ans = [0] * N

for start, end in zip(divs, divs[1:]):

    sub = S[start:end]

    M = end - start

    for j in range(M - 1):

        if sub[j] == "R" and sub[j + 1] == "L":

            if j % 2:

                ans[start + j] = M // 2

            else:

                ans[start + j] = (M + 1) // 2

            ans[start + j + 1] = M - ans[start + j]

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

def agg(li):
    LEN = len(li)
    agged = [0] * 2
    if LEN % 2:
        agged[0] = (LEN + 1) // 2
        agged[1] = LEN // 2
    else:
        agged[0] = agged[1] = LEN // 2
    for i in range(LEN - 1):
        if li[i + 1] != li[i]:
            if i % 2:
                return [0] * i + agged[::-1] + [0] * (LEN - i - 2)
            else:
                return [0] * i + agged + [0] * (LEN - i - 2)
    return


S = eval(input())
N = len(S)
ans = []
chunk = [S[0]]
for i in range(N - 1):
    if S[i] == "L" and S[i + 1] == "R":
        ans += agg(chunk)
        chunk = [S[i + 1]]
    else:
        chunk.append(S[i + 1])
ans += agg(chunk)
print((" ".join(map(str, ans))))

S = eval(input())
N = len(S)
divs = [0]
for i in range(N - 1):
    if S[i] == "L" and S[i + 1] == "R":
        divs.append(i + 1)
divs.append(N)
ans = [0] * N
for start, end in zip(divs, divs[1:]):
    sub = S[start:end]
    M = end - start
    for j in range(M - 1):
        if sub[j] == "R" and sub[j + 1] == "L":
            if j % 2:
                ans[start + j] = M // 2
            else:
                ans[start + j] = (M + 1) // 2
            ans[start + j + 1] = M - ans[start + j]
print((" ".join(map(str, ans))))

-def agg(li): -    LEN = len(li) -    agged = [0] * 2 -    if LEN % 2: -        agged[0] = (LEN + 1) // 2 -        agged[1] = LEN // 2 -    else: -        agged[0] = agged[1] = LEN // 2 -    for i in range(LEN - 1): -        if li[i + 1] != li[i]: -            if i % 2: -                return [0] * i + agged[::-1] + [0] * (LEN - i - 2) -            else: -                return [0] * i + agged + [0] * (LEN - i - 2) -    return - - -ans = [] -chunk = [S[0]] +divs = [0] -        ans += agg(chunk) -        chunk = [S[i + 1]] -    else: -        chunk.append(S[i + 1]) -ans += agg(chunk) +        divs.append(i + 1) +divs.append(N) +ans = [0] * N +for start, end in zip(divs, divs[1:]): +    sub = S[start:end] +    M = end - start +    for j in range(M - 1): +        if sub[j] == "R" and sub[j + 1] == "L": +            if j % 2: +                ans[start + j] = M // 2 +            else: +                ans[start + j] = (M + 1) // 2 +            ans[start + j + 1] = M - ans[start + j]