s=eval(input())

n=len(s)

ans=[1]*n

anss=[0]*n

for i in range(n):

  if s[i]=="R":

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

      ans[i+1]+=ans[i]

      ans[i]=0

    else:

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

      anss[i]+=0--ans[i]//2

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

  if s[i]=="L":

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

      ans[i-1]+=ans[i]

      ans[i]=0

    else:

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

      anss[i]+=0--ans[i]//2

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

n=len(s)

ans=[1]*n

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

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

		ans[i+1]+=ans[i-1]

		ans[i-1]=0

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

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

		ans[i-1]+=ans[i+1]

		ans[i+1]=0

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

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

-anss = [0] * n -for i in range(n): -    if s[i] == "R": -        if s[i + 1] == "R": -            ans[i + 1] += ans[i] -            ans[i] = 0 -        else: -            anss[i + 1] += ans[i] // 2 -            anss[i] += 0 - -ans[i] // 2 -for i in range(n - 1, -1, -1): -    if s[i] == "L": -        if s[i - 1] == "L": -            ans[i - 1] += ans[i] -            ans[i] = 0 -        else: -            anss[i - 1] += ans[i] // 2 -            anss[i] += 0 - -ans[i] // 2 -print((*anss)) +for i in range(1, n - 1): +    if s[i - 1] == s[i] == "R": +        ans[i + 1] += ans[i - 1] +        ans[i - 1] = 0 +for i in range(n - 2, 0, -1): +    if s[i] == s[i + 1] == "L": +        ans[i - 1] += ans[i + 1] +        ans[i + 1] = 0 +print((*ans))