s = eval(input())

n = len(s)

r = [0]*n

l = [0]*n

for i in range(n-1):

    if s[i] == "R":

        r[i] += 1

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

            r[i+2] += r[i]

            r[i] = 0

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

        l[-i-1] += 1

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

            l[-i-3] += l[-i-1]

            l[-i-1] = 0

ans = []

for i in range(n):

    ans.append(r[i]+l[i])

# print(r)

# print(l)

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

n  = len(s)

ans = [0]*n

rstrk = 0

lstrk = 0

for i in range(n):

    rstrk += 1

    if s[i] == "L":

        ans[i-1] += rstrk//2

        ans[i] += (rstrk+1)//2

        rstrk = 0

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

    lstrk += 1

    if s[i] == "R":

        ans[i+1] += lstrk//2

        ans[i] += (lstrk+1)//2

        lstrk = 0

    ans[i]-=1

print((*ans))
s = eval(input())
n = len(s)
r = [0] * n
l = [0] * n
for i in range(n - 1):
    if s[i] == "R":
        r[i] += 1
        if s[i + 1] == "R":
            r[i + 2] += r[i]
            r[i] = 0
    if s[-i - 1] == "L":
        l[-i - 1] += 1
        if s[-i - 2] == "L":
            l[-i - 3] += l[-i - 1]
            l[-i - 1] = 0
ans = []
for i in range(n):
    ans.append(r[i] + l[i])
# print(r)
# print(l)
print((*ans))

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

-r = [0] * n -l = [0] * n -for i in range(n - 1): +ans = [0] * n +rstrk = 0 +lstrk = 0 +for i in range(n): +    rstrk += 1 +    if s[i] == "L": +        ans[i - 1] += rstrk // 2 +        ans[i] += (rstrk + 1) // 2 +        rstrk = 0 +for i in range(n - 1, -1, -1): +    lstrk += 1 -        r[i] += 1 -        if s[i + 1] == "R": -            r[i + 2] += r[i] -            r[i] = 0 -    if s[-i - 1] == "L": -        l[-i - 1] += 1 -        if s[-i - 2] == "L": -            l[-i - 3] += l[-i - 1] -            l[-i - 1] = 0 -ans = [] -for i in range(n): -    ans.append(r[i] + l[i]) -# print(r) -# print(l) +        ans[i + 1] += lstrk // 2 +        ans[i] += (lstrk + 1) // 2 +        lstrk = 0 +    ans[i] -= 1