S = eval(input())

# S = "RL"

rs = []

ls = []

inds = []



s_inv = S[::-1]

rcnt = 0

#Rを数える

for i,s in enumerate(S):

    if s == "R":

        rcnt += 1

    else:

        if rcnt > 0:

            #記録

            rs.append(rcnt)

            inds.append(i-1)

        rcnt = 0

#Lを数える

# print(s_inv)

lcnt = 0

for i,s in enumerate(s_inv):

    if s == "L":

        lcnt += 1

    else:

        if lcnt > 0:

            ls.append(lcnt)

        lcnt = 0

ls = ls[::-1]



ans = [0]*len(S)

for i,r,l in zip(inds,rs,ls):

    adds = r+l

    # print(adds,i)

    if (r+l)%2 == 0:

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

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

    else:

        if r%2 == 1:

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

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

        else:

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

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



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

prev = ""

cut = [0]

inds = []

rs = []

r = 0

for i in range(len(S)):

    if prev == "L" and S[i] == "R":

        cut.append(i)

    if prev == "R" and S[i] == "L":

        inds.append(i)

        rs.append(r)

        r = 0

    if S[i] == "R":

        r += 1

    prev = S[i]

cut.append(len(S))

diff = [cut[i]-cut[i-1] for i in range(1,len(cut))]

ans = [0] * len(S)

# print(rs)

# print(diff)

# print(inds)

for d, i, r in zip(diff, inds, rs):

    ans[i-1] = d//2 

    ans[i] = d//2

    if d%2 == 1 and r%2==1:

        ans[i-1] += 1

    elif d%2 == 1 and r%2 == 0:

        ans[i] += 1

print((*ans))
S = eval(input())
# S = "RL"
rs = []
ls = []
inds = []
s_inv = S[::-1]
rcnt = 0
# Rを数える
for i, s in enumerate(S):
    if s == "R":
        rcnt += 1
    else:
        if rcnt > 0:
            # 記録
            rs.append(rcnt)
            inds.append(i - 1)
        rcnt = 0
# Lを数える
# print(s_inv)
lcnt = 0
for i, s in enumerate(s_inv):
    if s == "L":
        lcnt += 1
    else:
        if lcnt > 0:
            ls.append(lcnt)
        lcnt = 0
ls = ls[::-1]
ans = [0] * len(S)
for i, r, l in zip(inds, rs, ls):
    adds = r + l
    # print(adds,i)
    if (r + l) % 2 == 0:
        ans[i] = (r + l) // 2
        ans[i + 1] = (r + l) // 2
    else:
        if r % 2 == 1:
            ans[i] = (r + l) // 2 + 1
            ans[i + 1] = (r + l) // 2
        else:
            ans[i] = (r + l) // 2
            ans[i + 1] = (r + l) // 2 + 1
print((*ans))

S = eval(input())
prev = ""
cut = [0]
inds = []
rs = []
r = 0
for i in range(len(S)):
    if prev == "L" and S[i] == "R":
        cut.append(i)
    if prev == "R" and S[i] == "L":
        inds.append(i)
        rs.append(r)
        r = 0
    if S[i] == "R":
        r += 1
    prev = S[i]
cut.append(len(S))
diff = [cut[i] - cut[i - 1] for i in range(1, len(cut))]
ans = [0] * len(S)
# print(rs)
# print(diff)
# print(inds)
for d, i, r in zip(diff, inds, rs):
    ans[i - 1] = d // 2
    ans[i] = d // 2
    if d % 2 == 1 and r % 2 == 1:
        ans[i - 1] += 1
    elif d % 2 == 1 and r % 2 == 0:
        ans[i] += 1
print((*ans))

-# S = "RL" +prev = "" +cut = [0] +inds = [] -ls = [] -inds = [] -s_inv = S[::-1] -rcnt = 0 -# Rを数える -for i, s in enumerate(S): -    if s == "R": -        rcnt += 1 -    else: -        if rcnt > 0: -            # 記録 -            rs.append(rcnt) -            inds.append(i - 1) -        rcnt = 0 -# Lを数える -# print(s_inv) -lcnt = 0 -for i, s in enumerate(s_inv): -    if s == "L": -        lcnt += 1 -    else: -        if lcnt > 0: -            ls.append(lcnt) -        lcnt = 0 -ls = ls[::-1] +r = 0 +for i in range(len(S)): +    if prev == "L" and S[i] == "R": +        cut.append(i) +    if prev == "R" and S[i] == "L": +        inds.append(i) +        rs.append(r) +        r = 0 +    if S[i] == "R": +        r += 1 +    prev = S[i] +cut.append(len(S)) +diff = [cut[i] - cut[i - 1] for i in range(1, len(cut))] -for i, r, l in zip(inds, rs, ls): -    adds = r + l -    # print(adds,i) -    if (r + l) % 2 == 0: -        ans[i] = (r + l) // 2 -        ans[i + 1] = (r + l) // 2 -    else: -        if r % 2 == 1: -            ans[i] = (r + l) // 2 + 1 -            ans[i + 1] = (r + l) // 2 -        else: -            ans[i] = (r + l) // 2 -            ans[i + 1] = (r + l) // 2 + 1 +# print(rs) +# print(diff) +# print(inds) +for d, i, r in zip(diff, inds, rs): +    ans[i - 1] = d // 2 +    ans[i] = d // 2 +    if d % 2 == 1 and r % 2 == 1: +        ans[i - 1] += 1 +    elif d % 2 == 1 and r % 2 == 0: +        ans[i] += 1