s=eval(input())

n=len(s)

ans = [0]*n



c=0

for i in range(n-1):

    if s[i]=='R':

        c+=1

        if s[i+1]=='L':

            ans[i]+=c//2 + (c&1)

            ans[i+1]+=c//2

            c=0



c=0

for i in range(n-1,0,-1):

    if s[i]=='L':

        c+=1

        if s[i-1]=='R':

            ans[i]+=c//2 + (c&1)

            ans[i-1]+=c//2

            c=0



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

N = len(S)

ans = [0] * N

c = 0

for i in range(N):

    if S[i] == 'R':

        c += 1

    else:

        ans[i] += c // 2

        ans[i - 1] += c // 2 + c % 2

        c = 0

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

    if S[i] == 'L':

        c += 1

    else:

        ans[i] += c // 2

        ans[i + 1] += c // 2 + c % 2

        c = 0

print((*ans))

s = eval(input())
n = len(s)
ans = [0] * n
c = 0
for i in range(n - 1):
    if s[i] == "R":
        c += 1
        if s[i + 1] == "L":
            ans[i] += c // 2 + (c & 1)
            ans[i + 1] += c // 2
            c = 0
c = 0
for i in range(n - 1, 0, -1):
    if s[i] == "L":
        c += 1
        if s[i - 1] == "R":
            ans[i] += c // 2 + (c & 1)
            ans[i - 1] += c // 2
            c = 0
print((*ans))

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

-s = eval(input()) -n = len(s) -ans = [0] * n +S = eval(input()) +N = len(S) +ans = [0] * N -for i in range(n - 1): -    if s[i] == "R": +for i in range(N): +    if S[i] == "R": -        if s[i + 1] == "L": -            ans[i] += c // 2 + (c & 1) -            ans[i + 1] += c // 2 -            c = 0 -c = 0 -for i in range(n - 1, 0, -1): -    if s[i] == "L": +    else: +        ans[i] += c // 2 +        ans[i - 1] += c // 2 + c % 2 +        c = 0 +for i in range(N - 1, -1, -1): +    if S[i] == "L": -        if s[i - 1] == "R": -            ans[i] += c // 2 + (c & 1) -            ans[i - 1] += c // 2 -            c = 0 +    else: +        ans[i] += c // 2 +        ans[i + 1] += c // 2 + c % 2 +        c = 0