s = eval(input())

n = len(s)

tp = []

rl = [1]

for i in range(1, n):

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

        rl[-1] += 1

    elif s[i - 1] == "R" and s[i] == "L":

        tp.append((i - 1, i))

        rl.append(1)

    else:

        rl.append(1)



rll = tuple(zip(rl[::2], rl[1::2]))

#print(rll,tp)



inl = []

for i, j in rll:

    if (i%2 == 0 and j%2 == 0) or (i%2 == 1 and j%2 == 1):

        x, y = (i+j)//2, (i+j)//2

        inl.append((x,y))

    elif i % 2 == 1 and j % 2 == 0:

        x, y = (i+j)//2+1, (i+j)//2

        inl.append((x,y))

    else:

        x, y = (i+j)//2, (i+j)//2+1

        inl.append((x,y))

#print(inl)

inpt = dict()

for i, k in enumerate(tp):

    inpt[k[0]] = inl[i][0]

    inpt[k[1]] = inl[i][1]

#print(inpt)

res = []

for i in range(n):

    res.append(inpt.get(i, 0))

print((" ".join([str(i) for i in res])))

s = eval(input())

n = len(s)

chd = [0] * n



cnt = 0

for i in range(n - 1):

    if s[i] == "R":

        cnt += 1

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

            chd[i] += (cnt+1)//2

            chd[i + 1] += cnt//2

            cnt = 0



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

    if s[i] == "L":

        cnt += 1

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

            chd[i] += (cnt+1)//2

            chd[i - 1] += cnt//2

            cnt = 0



print((*chd))

s = eval(input())
n = len(s)
tp = []
rl = [1]
for i in range(1, n):
    if s[i] == s[i - 1]:
        rl[-1] += 1
    elif s[i - 1] == "R" and s[i] == "L":
        tp.append((i - 1, i))
        rl.append(1)
    else:
        rl.append(1)
rll = tuple(zip(rl[::2], rl[1::2]))
# print(rll,tp)
inl = []
for i, j in rll:
    if (i % 2 == 0 and j % 2 == 0) or (i % 2 == 1 and j % 2 == 1):
        x, y = (i + j) // 2, (i + j) // 2
        inl.append((x, y))
    elif i % 2 == 1 and j % 2 == 0:
        x, y = (i + j) // 2 + 1, (i + j) // 2
        inl.append((x, y))
    else:
        x, y = (i + j) // 2, (i + j) // 2 + 1
        inl.append((x, y))
# print(inl)
inpt = dict()
for i, k in enumerate(tp):
    inpt[k[0]] = inl[i][0]
    inpt[k[1]] = inl[i][1]
# print(inpt)
res = []
for i in range(n):
    res.append(inpt.get(i, 0))
print((" ".join([str(i) for i in res])))

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

-tp = [] -rl = [1] -for i in range(1, n): -    if s[i] == s[i - 1]: -        rl[-1] += 1 -    elif s[i - 1] == "R" and s[i] == "L": -        tp.append((i - 1, i)) -        rl.append(1) -    else: -        rl.append(1) -rll = tuple(zip(rl[::2], rl[1::2])) -# print(rll,tp) -inl = [] -for i, j in rll: -    if (i % 2 == 0 and j % 2 == 0) or (i % 2 == 1 and j % 2 == 1): -        x, y = (i + j) // 2, (i + j) // 2 -        inl.append((x, y)) -    elif i % 2 == 1 and j % 2 == 0: -        x, y = (i + j) // 2 + 1, (i + j) // 2 -        inl.append((x, y)) -    else: -        x, y = (i + j) // 2, (i + j) // 2 + 1 -        inl.append((x, y)) -# print(inl) -inpt = dict() -for i, k in enumerate(tp): -    inpt[k[0]] = inl[i][0] -    inpt[k[1]] = inl[i][1] -# print(inpt) -res = [] -for i in range(n): -    res.append(inpt.get(i, 0)) -print((" ".join([str(i) for i in res]))) +chd = [0] * n +cnt = 0 +for i in range(n - 1): +    if s[i] == "R": +        cnt += 1 +        if s[i + 1] == "L": +            chd[i] += (cnt + 1) // 2 +            chd[i + 1] += cnt // 2 +            cnt = 0 +for i in range(n - 1, 0, -1): +    if s[i] == "L": +        cnt += 1 +        if s[i - 1] == "R": +            chd[i] += (cnt + 1) // 2 +            chd[i - 1] += cnt // 2 +            cnt = 0 +print((*chd))