s = list(str(eval(input())))

t = list(reversed(s))

#print(s)

#print(t)



n = len(s)



r = []

temp = 0

for i in range(n):

    if s[i] == 'R':

        temp += 1

    else:

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

            r.append(temp)



l = []

temp = 0

for i in range(n):

    if t[i] == 'L':

        temp += 1

    else:

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

            l.append(temp)

#print(r)

#print(l)



r_ = []

l_ = []

for i in range(len(r)):

    if i == 0:

        r_.append(r[i])

        l_.append(l[i])

    else:

        r_.append(r[i]-r[i-1])

        l_.append(l[i]-l[i-1])

l_ = list(reversed(l_))

#print(r_)

#print(l_)



ans = [0]*n

cnt = 0

for i in range(n):

    if i==n-1:

        continue

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

        ans[i] = l_[cnt]//2+(r_[cnt]+1)//2

        ans[i+1] = (l_[cnt]+1)//2+r_[cnt]//2

        cnt += 1

print((*ans))

s = str(eval(input()))

n = len(s)

t = []

for i in range(n-1):

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

        ir = i

        #il = i+1

        #t.append([ir, il])

        t.append(ir)



from collections import deque

t.append(10**6)

t_ = deque(t)

post = []

ans = [0]*n

for i in range(n):

    ir = t_.popleft()

    if i < ir:

        if s[i] == 'R':

            if i%2 == ir%2:

                ans[ir] += 1

            else:

                ans[ir+1] += 1

        if s[i] == 'L':

            if i%2 == post[-1]%2:

                ans[post[-1]] += 1

            else:

                ans[post[-1]+1] += 1

        t_.appendleft(ir)

    if i == ir:

        ans[ir] += 1

        post.append(ir)

print((*ans))
s = list(str(eval(input())))
t = list(reversed(s))
# print(s)
# print(t)
n = len(s)
r = []
temp = 0
for i in range(n):
    if s[i] == "R":
        temp += 1
    else:
        if i >= 1 and s[i - 1] == "R" and s[i] == "L":
            r.append(temp)
l = []
temp = 0
for i in range(n):
    if t[i] == "L":
        temp += 1
    else:
        if i >= 1 and t[i - 1] == "L" and t[i] == "R":
            l.append(temp)
# print(r)
# print(l)
r_ = []
l_ = []
for i in range(len(r)):
    if i == 0:
        r_.append(r[i])
        l_.append(l[i])
    else:
        r_.append(r[i] - r[i - 1])
        l_.append(l[i] - l[i - 1])
l_ = list(reversed(l_))
# print(r_)
# print(l_)
ans = [0] * n
cnt = 0
for i in range(n):
    if i == n - 1:
        continue
    if s[i] == "R" and s[i + 1] == "L":
        ans[i] = l_[cnt] // 2 + (r_[cnt] + 1) // 2
        ans[i + 1] = (l_[cnt] + 1) // 2 + r_[cnt] // 2
        cnt += 1
print((*ans))

s = str(eval(input()))
n = len(s)
t = []
for i in range(n - 1):
    if s[i] == "R" and s[i + 1] == "L":
        ir = i
        # il = i+1
        # t.append([ir, il])
        t.append(ir)
from collections import deque

t.append(10**6)
t_ = deque(t)
post = []
ans = [0] * n
for i in range(n):
    ir = t_.popleft()
    if i < ir:
        if s[i] == "R":
            if i % 2 == ir % 2:
                ans[ir] += 1
            else:
                ans[ir + 1] += 1
        if s[i] == "L":
            if i % 2 == post[-1] % 2:
                ans[post[-1]] += 1
            else:
                ans[post[-1] + 1] += 1
        t_.appendleft(ir)
    if i == ir:
        ans[ir] += 1
        post.append(ir)
print((*ans))

-s = list(str(eval(input()))) -t = list(reversed(s)) -# print(s) -# print(t) +s = str(eval(input())) -r = [] -temp = 0 +t = [] +for i in range(n - 1): +    if s[i] == "R" and s[i + 1] == "L": +        ir = i +        # il = i+1 +        # t.append([ir, il]) +        t.append(ir) +from collections import deque + +t.append(10**6) +t_ = deque(t) +post = [] +ans = [0] * n -    if s[i] == "R": -        temp += 1 -    else: -        if i >= 1 and s[i - 1] == "R" and s[i] == "L": -            r.append(temp) -l = [] -temp = 0 -for i in range(n): -    if t[i] == "L": -        temp += 1 -    else: -        if i >= 1 and t[i - 1] == "L" and t[i] == "R": -            l.append(temp) -# print(r) -# print(l) -r_ = [] -l_ = [] -for i in range(len(r)): -    if i == 0: -        r_.append(r[i]) -        l_.append(l[i]) -    else: -        r_.append(r[i] - r[i - 1]) -        l_.append(l[i] - l[i - 1]) -l_ = list(reversed(l_)) -# print(r_) -# print(l_) -ans = [0] * n -cnt = 0 -for i in range(n): -    if i == n - 1: -        continue -    if s[i] == "R" and s[i + 1] == "L": -        ans[i] = l_[cnt] // 2 + (r_[cnt] + 1) // 2 -        ans[i + 1] = (l_[cnt] + 1) // 2 + r_[cnt] // 2 -        cnt += 1 +    ir = t_.popleft() +    if i < ir: +        if s[i] == "R": +            if i % 2 == ir % 2: +                ans[ir] += 1 +            else: +                ans[ir + 1] += 1 +        if s[i] == "L": +            if i % 2 == post[-1] % 2: +                ans[post[-1]] += 1 +            else: +                ans[post[-1] + 1] += 1 +        t_.appendleft(ir) +    if i == ir: +        ans[ir] += 1 +        post.append(ir)