S = eval(input())

seq = [1]

pos = []

for i,(a,b) in enumerate(zip(S,S[1:])):

    if a+b == 'RL':

        pos.append(i)

    if a==b:

        seq[-1] += 1

    else:

        seq.append(1)



ans = [0] * len(S)

for r,l,p in zip(seq[::2],seq[1::2],pos):

    ans[p] = ans[p+1] = (r+l)//2

    if (r+l)%2:

        if r > l:

            ans[p] += 1

        else:

            ans[p+1] += 1

        if max(r,l)%2==0:

            ans[p],ans[p+1] = ans[p+1],ans[p]

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



arr = []

seq = 1

for i,(a,b) in enumerate(zip(S,S[1:])):

    if a==b:

        seq += 1

    else:

        arr.append(seq)

        seq = 1

arr.append(seq)



assert len(arr)%2==0



ans = [0]*len(S)

i = 0

for r,l in zip(arr[::2],arr[1::2]):

    i += r

    ans[i-1] = ans[i] = (r+l)//2

    if (r+l)%2:

        if r<l:

            if l%2:

                ans[i] += 1

            else:

                ans[i-1] += 1

        else:

            if r%2:

                ans[i-1] += 1

            else:

                ans[i] += 1

    i += l



print((*ans))
S = eval(input())
seq = [1]
pos = []
for i, (a, b) in enumerate(zip(S, S[1:])):
    if a + b == "RL":
        pos.append(i)
    if a == b:
        seq[-1] += 1
    else:
        seq.append(1)
ans = [0] * len(S)
for r, l, p in zip(seq[::2], seq[1::2], pos):
    ans[p] = ans[p + 1] = (r + l) // 2
    if (r + l) % 2:
        if r > l:
            ans[p] += 1
        else:
            ans[p + 1] += 1
        if max(r, l) % 2 == 0:
            ans[p], ans[p + 1] = ans[p + 1], ans[p]
print((*ans))

S = eval(input())
arr = []
seq = 1
for i, (a, b) in enumerate(zip(S, S[1:])):
    if a == b:
        seq += 1
    else:
        arr.append(seq)
        seq = 1
arr.append(seq)
assert len(arr) % 2 == 0
ans = [0] * len(S)
i = 0
for r, l in zip(arr[::2], arr[1::2]):
    i += r
    ans[i - 1] = ans[i] = (r + l) // 2
    if (r + l) % 2:
        if r < l:
            if l % 2:
                ans[i] += 1
            else:
                ans[i - 1] += 1
        else:
            if r % 2:
                ans[i - 1] += 1
            else:
                ans[i] += 1
    i += l
print((*ans))

-seq = [1] -pos = [] +arr = [] +seq = 1 -    if a + b == "RL": -        pos.append(i) -        seq[-1] += 1 +        seq += 1 -        seq.append(1) +        arr.append(seq) +        seq = 1 +arr.append(seq) +assert len(arr) % 2 == 0 -for r, l, p in zip(seq[::2], seq[1::2], pos): -    ans[p] = ans[p + 1] = (r + l) // 2 +i = 0 +for r, l in zip(arr[::2], arr[1::2]): +    i += r +    ans[i - 1] = ans[i] = (r + l) // 2 -        if r > l: -            ans[p] += 1 +        if r < l: +            if l % 2: +                ans[i] += 1 +            else: +                ans[i - 1] += 1 -            ans[p + 1] += 1 -        if max(r, l) % 2 == 0: -            ans[p], ans[p + 1] = ans[p + 1], ans[p] +            if r % 2: +                ans[i - 1] += 1 +            else: +                ans[i] += 1 +    i += l