S = eval(input())



l = []

r = []

tmp = 0

for s in S:

    if s == 'L':

        r.append(tmp)

        tmp = 0

    else:

        r.append(0)

        tmp += 1

tmp = 0

for s in S[::-1]:

    if s == 'R':

        l.append(tmp)

        tmp = 0

    else:

        l.append(0)

        tmp += 1

l = l[::-1]

ans = [0 for i in range(len(S))]

for i in range(len(S)-1):

    ans[i] += r[i+1] % 2 + r[i+1] // 2 + l[i] // 2

    ans[i+1] += r[i+1] // 2 + l[i] % 2 + l[i] // 2

print((*ans))

s = eval(input())



right, left = [], []

r,l = 0,0

for i in range(len(s)):

    if s[i] == 'R':

        r += 1

        right.append(0)

    else:

        right.append(r)

        r = 0

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

        l += 1

        left.append(0)

    else:

        left.append(l)

        l = 0

left = left[::-1]



ans = [0] * len(s)

for i in range(len(s)):

    if right[i]:

        ans[i] += right[i] // 2

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

    if left[i]:

        ans[i] += left[i] // 2

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

print((*ans))

       
S = eval(input())
l = []
r = []
tmp = 0
for s in S:
    if s == "L":
        r.append(tmp)
        tmp = 0
    else:
        r.append(0)
        tmp += 1
tmp = 0
for s in S[::-1]:
    if s == "R":
        l.append(tmp)
        tmp = 0
    else:
        l.append(0)
        tmp += 1
l = l[::-1]
ans = [0 for i in range(len(S))]
for i in range(len(S) - 1):
    ans[i] += r[i + 1] % 2 + r[i + 1] // 2 + l[i] // 2
    ans[i + 1] += r[i + 1] // 2 + l[i] % 2 + l[i] // 2
print((*ans))

s = eval(input())
right, left = [], []
r, l = 0, 0
for i in range(len(s)):
    if s[i] == "R":
        r += 1
        right.append(0)
    else:
        right.append(r)
        r = 0
    if s[-i - 1] == "L":
        l += 1
        left.append(0)
    else:
        left.append(l)
        l = 0
left = left[::-1]
ans = [0] * len(s)
for i in range(len(s)):
    if right[i]:
        ans[i] += right[i] // 2
        ans[i - 1] += right[i] // 2 + right[i] % 2
    if left[i]:
        ans[i] += left[i] // 2
        ans[i + 1] += left[i] // 2 + left[i] % 2
print((*ans))

-S = eval(input()) -l = [] -r = [] -tmp = 0 -for s in S: -    if s == "L": -        r.append(tmp) -        tmp = 0 +s = eval(input()) +right, left = [], [] +r, l = 0, 0 +for i in range(len(s)): +    if s[i] == "R": +        r += 1 +        right.append(0) -        r.append(0) -        tmp += 1 -tmp = 0 -for s in S[::-1]: -    if s == "R": -        l.append(tmp) -        tmp = 0 +        right.append(r) +        r = 0 +    if s[-i - 1] == "L": +        l += 1 +        left.append(0) -        l.append(0) -        tmp += 1 -l = l[::-1] -ans = [0 for i in range(len(S))] -for i in range(len(S) - 1): -    ans[i] += r[i + 1] % 2 + r[i + 1] // 2 + l[i] // 2 -    ans[i + 1] += r[i + 1] // 2 + l[i] % 2 + l[i] // 2 +        left.append(l) +        l = 0 +left = left[::-1] +ans = [0] * len(s) +for i in range(len(s)): +    if right[i]: +        ans[i] += right[i] // 2 +        ans[i - 1] += right[i] // 2 + right[i] % 2 +    if left[i]: +        ans[i] += left[i] // 2 +        ans[i + 1] += left[i] // 2 + left[i] % 2