s = eval(input())

n = len(s)



#RRLRL=(R2L),(RL)

#ランレングス圧縮でRLを圧縮し、数の偶奇で分配する

#n<=10**5なので、10**5移動させた後の値でも求められる

v=[]

def RLE(s,v):

    for i in range(len(s)):

        if len(v)==0 or v[-1][0]!=s[i]:

            v.append([s[i],1])

        else:

            v[-1][1]+=1

    return v

rle_li = RLE(s,v)



string_li = [0]*n

for i in range(1,n):

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

        x = rle_li.pop(0)[1]

        y = rle_li.pop(0)[1]

        if x==1 and y==1:

            string_li[i-1]=1

            string_li[i]=1

        else:

            if y%2==0:

                string_li[i-1]+=y//2

                string_li[i]+=y//2

            else:

                string_li[i-1]+=y//2

                string_li[i]+=y//2+1

            if x%2==0:

                string_li[i-1]+=x//2

                string_li[i]+=x//2

            else:

                string_li[i-1]+=x//2+1

                string_li[i]+=x//2

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



s = eval(input())

l=len(s)

ans=[1]*l

for i in range(l-1):

    if s[i]==s[i+1]=="R":

        ans[i+2]+=ans[i]

        ans[i]=0

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

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

        ans[i-2]+=ans[i]

        ans[i]=0

print((*ans))
s = eval(input())
n = len(s)
# RRLRL=(R2L),(RL)
# ランレングス圧縮でRLを圧縮し、数の偶奇で分配する
# n<=10**5なので、10**5移動させた後の値でも求められる
v = []


def RLE(s, v):
    for i in range(len(s)):
        if len(v) == 0 or v[-1][0] != s[i]:
            v.append([s[i], 1])
        else:
            v[-1][1] += 1
    return v


rle_li = RLE(s, v)
string_li = [0] * n
for i in range(1, n):
    if s[i - 1] == "R" and s[i] == "L":
        x = rle_li.pop(0)[1]
        y = rle_li.pop(0)[1]
        if x == 1 and y == 1:
            string_li[i - 1] = 1
            string_li[i] = 1
        else:
            if y % 2 == 0:
                string_li[i - 1] += y // 2
                string_li[i] += y // 2
            else:
                string_li[i - 1] += y // 2
                string_li[i] += y // 2 + 1
            if x % 2 == 0:
                string_li[i - 1] += x // 2
                string_li[i] += x // 2
            else:
                string_li[i - 1] += x // 2 + 1
                string_li[i] += x // 2
print((" ".join(map(str, string_li))))

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

-n = len(s) -# RRLRL=(R2L),(RL) -# ランレングス圧縮でRLを圧縮し、数の偶奇で分配する -# n<=10**5なので、10**5移動させた後の値でも求められる -v = [] - - -def RLE(s, v): -    for i in range(len(s)): -        if len(v) == 0 or v[-1][0] != s[i]: -            v.append([s[i], 1]) -        else: -            v[-1][1] += 1 -    return v - - -rle_li = RLE(s, v) -string_li = [0] * n -for i in range(1, n): -    if s[i - 1] == "R" and s[i] == "L": -        x = rle_li.pop(0)[1] -        y = rle_li.pop(0)[1] -        if x == 1 and y == 1: -            string_li[i - 1] = 1 -            string_li[i] = 1 -        else: -            if y % 2 == 0: -                string_li[i - 1] += y // 2 -                string_li[i] += y // 2 -            else: -                string_li[i - 1] += y // 2 -                string_li[i] += y // 2 + 1 -            if x % 2 == 0: -                string_li[i - 1] += x // 2 -                string_li[i] += x // 2 -            else: -                string_li[i - 1] += x // 2 + 1 -                string_li[i] += x // 2 -print((" ".join(map(str, string_li)))) +l = len(s) +ans = [1] * l +for i in range(l - 1): +    if s[i] == s[i + 1] == "R": +        ans[i + 2] += ans[i] +        ans[i] = 0 +for i in range(l - 1, 1, -1): +    if s[i] == s[i - 1] == "L": +        ans[i - 2] += ans[i] +        ans[i] = 0 +print((*ans))