s = eval(input())

lenn = len(s)

n_bef = -1

l = []

def add_l(m,n):

	global n_bef

	p = m - n_bef

	q = n-m

	l.extend([0] * (p-1))

	l.append(-~p//2+q//2)

	l.append(p//2+(-~q)//2)

	l.extend([0] * (q-1))

	n_bef = n



for i in range(lenn-1):

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

		m = i

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

		n = i

		add_l(m,n)

	if i == lenn - 2:

		n = i + 1

		add_l(m,n)

print((*l))

s = eval(input())

n = len(s)

answer = [1] * n

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

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

			answer[i+2] += answer[i]

			answer[i] = 0

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

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

			answer[i-2] += answer[i]

			answer[i] = 0

print((*answer))

s = eval(input())
lenn = len(s)
n_bef = -1
l = []


def add_l(m, n):
    global n_bef
    p = m - n_bef
    q = n - m
    l.extend([0] * (p - 1))
    l.append(-~p // 2 + q // 2)
    l.append(p // 2 + (-~q) // 2)
    l.extend([0] * (q - 1))
    n_bef = n


for i in range(lenn - 1):
    if s[i] == "R" and s[i + 1] == "L":
        m = i
    if s[i] == "L" and s[i + 1] == "R":
        n = i
        add_l(m, n)
    if i == lenn - 2:
        n = i + 1
        add_l(m, n)
print((*l))

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

-lenn = len(s) -n_bef = -1 -l = [] - - -def add_l(m, n): -    global n_bef -    p = m - n_bef -    q = n - m -    l.extend([0] * (p - 1)) -    l.append(-~p // 2 + q // 2) -    l.append(p // 2 + (-~q) // 2) -    l.extend([0] * (q - 1)) -    n_bef = n - - -for i in range(lenn - 1): -    if s[i] == "R" and s[i + 1] == "L": -        m = i -    if s[i] == "L" and s[i + 1] == "R": -        n = i -        add_l(m, n) -    if i == lenn - 2: -        n = i + 1 -        add_l(m, n) -print((*l)) +n = len(s) +answer = [1] * n +for i in range(0, n - 2): +    if s[i] == "R" and s[i + 1] == "R": +        answer[i + 2] += answer[i] +        answer[i] = 0 +for i in range(n - 1, -1, -1): +    if s[i] == "L" and s[i - 1] == "L": +        answer[i - 2] += answer[i] +        answer[i] = 0 +print((*answer))