s = eval(input())

s += 'R'

n = len(s)



ans = [0 for i in range(n-1)]



def move(block):

    blen = len(block)

    lidx = block.find('L')

    if lidx ==-1:

        return

    ans[restart+lidx] = blen//2

    ans[restart+lidx-1] = blen//2

    if blen %2 ==1:

        if lidx %2 ==0:

            ans[restart+lidx]+=1

        else:

            ans[restart+lidx-1]+=1

    



restart = 0

while True:

    sep = s.find('LR')

    block = s[0:sep+1]

    move(block)

    restart += sep+1

    s = s[sep+1:]

    if sep ==-1:

        break



print((*ans))
import sys

import re

S = sys.stdin.readline()



ptn = 'R+L+'

ptn = re.compile(ptn)

result = ptn.findall(S)

#print(result)

ans = []

for bl in result:

    len_bl_half = len(bl)//2

    tmp = [0 for _ in range(len(bl))]

    ln = bl.find('L')

    #print(ln)

    if len(bl)%2==0:

        tmp[ln] = len_bl_half 

        tmp[ln-1] = len_bl_half 

    else:

        if ln %2==0:

            tmp[ln] = 1+ len_bl_half 

            tmp[ln-1] =len_bl_half 

        else:

            tmp[ln] =len_bl_half 

            tmp[ln-1] =1 + len_bl_half 

    ans +=tmp

        

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


def move(block):
    blen = len(block)
    lidx = block.find("L")
    if lidx == -1:
        return
    ans[restart + lidx] = blen // 2
    ans[restart + lidx - 1] = blen // 2
    if blen % 2 == 1:
        if lidx % 2 == 0:
            ans[restart + lidx] += 1
        else:
            ans[restart + lidx - 1] += 1


restart = 0
while True:
    sep = s.find("LR")
    block = s[0 : sep + 1]
    move(block)
    restart += sep + 1
    s = s[sep + 1 :]
    if sep == -1:
        break
print((*ans))

import sys
import re

S = sys.stdin.readline()
ptn = "R+L+"
ptn = re.compile(ptn)
result = ptn.findall(S)
# print(result)
ans = []
for bl in result:
    len_bl_half = len(bl) // 2
    tmp = [0 for _ in range(len(bl))]
    ln = bl.find("L")
    # print(ln)
    if len(bl) % 2 == 0:
        tmp[ln] = len_bl_half
        tmp[ln - 1] = len_bl_half
    else:
        if ln % 2 == 0:
            tmp[ln] = 1 + len_bl_half
            tmp[ln - 1] = len_bl_half
        else:
            tmp[ln] = len_bl_half
            tmp[ln - 1] = 1 + len_bl_half
    ans += tmp
print((*ans))

-s = eval(input()) -s += "R" -n = len(s) -ans = [0 for i in range(n - 1)] +import sys +import re - -def move(block): -    blen = len(block) -    lidx = block.find("L") -    if lidx == -1: -        return -    ans[restart + lidx] = blen // 2 -    ans[restart + lidx - 1] = blen // 2 -    if blen % 2 == 1: -        if lidx % 2 == 0: -            ans[restart + lidx] += 1 +S = sys.stdin.readline() +ptn = "R+L+" +ptn = re.compile(ptn) +result = ptn.findall(S) +# print(result) +ans = [] +for bl in result: +    len_bl_half = len(bl) // 2 +    tmp = [0 for _ in range(len(bl))] +    ln = bl.find("L") +    # print(ln) +    if len(bl) % 2 == 0: +        tmp[ln] = len_bl_half +        tmp[ln - 1] = len_bl_half +    else: +        if ln % 2 == 0: +            tmp[ln] = 1 + len_bl_half +            tmp[ln - 1] = len_bl_half -            ans[restart + lidx - 1] += 1 - - -restart = 0 -while True: -    sep = s.find("LR") -    block = s[0 : sep + 1] -    move(block) -    restart += sep + 1 -    s = s[sep + 1 :] -    if sep == -1: -        break +            tmp[ln] = len_bl_half +            tmp[ln - 1] = 1 + len_bl_half +    ans += tmp