from queue import Queue

s = eval(input())



prev = ""

ls = []

part = ""

for c in s:

    if prev == 'L' and c == "R":

        ls.append(part)

        part = c

    else:

        part += c

    prev = c

ls.append(part)





num_ls = Queue()

for block in ls:

    len_block = len(block)

    if len_block % 2 == 0:

        num_ls.put((len_block//2, len_block//2))

    else:

        if block.index("L") % 2 == 1:

            num_ls.put((-(-len_block//2), len_block//2))

        else:

            num_ls.put((len_block//2, -(-len_block//2)))



ans = [0]*len(s)



prev = ""

for i, c in enumerate(s):

    if prev == "R" and c == "L":

        left, right = num_ls.get()

        ans[i-1] = left

        ans[i] = right

    prev = c



print((*ans))

s = eval(input())





def calc_lr(block):

    len_block = len(block)

    if len_block % 2 == 0:

        return (len_block//2, len_block//2)

    else:

        if block.index("L") % 2 == 1:

            return (-(-len_block//2), len_block//2)

        else:

            return (len_block//2, -(-len_block//2))





prev = ""

part = ""

ans = [0]*len(s)

for idx, c in enumerate(s):

    if prev == "R" and c == "L":

        idx_pair = (idx-1, idx)



    if prev == 'L' and c == "R":

        left, right = calc_lr(part)

        i, j = idx_pair

        ans[i] = left

        ans[j] = right

        part = c

    else:

        part += c

    prev = c

else:

    left, right = calc_lr(part)

    i, j = idx_pair

    ans[i] = left

    ans[j] = right





print((*ans))
from queue import Queue

s = eval(input())
prev = ""
ls = []
part = ""
for c in s:
    if prev == "L" and c == "R":
        ls.append(part)
        part = c
    else:
        part += c
    prev = c
ls.append(part)
num_ls = Queue()
for block in ls:
    len_block = len(block)
    if len_block % 2 == 0:
        num_ls.put((len_block // 2, len_block // 2))
    else:
        if block.index("L") % 2 == 1:
            num_ls.put((-(-len_block // 2), len_block // 2))
        else:
            num_ls.put((len_block // 2, -(-len_block // 2)))
ans = [0] * len(s)
prev = ""
for i, c in enumerate(s):
    if prev == "R" and c == "L":
        left, right = num_ls.get()
        ans[i - 1] = left
        ans[i] = right
    prev = c
print((*ans))

s = eval(input())


def calc_lr(block):
    len_block = len(block)
    if len_block % 2 == 0:
        return (len_block // 2, len_block // 2)
    else:
        if block.index("L") % 2 == 1:
            return (-(-len_block // 2), len_block // 2)
        else:
            return (len_block // 2, -(-len_block // 2))


prev = ""
part = ""
ans = [0] * len(s)
for idx, c in enumerate(s):
    if prev == "R" and c == "L":
        idx_pair = (idx - 1, idx)
    if prev == "L" and c == "R":
        left, right = calc_lr(part)
        i, j = idx_pair
        ans[i] = left
        ans[j] = right
        part = c
    else:
        part += c
    prev = c
else:
    left, right = calc_lr(part)
    i, j = idx_pair
    ans[i] = left
    ans[j] = right
print((*ans))

-from queue import Queue +s = eval(input()) -s = eval(input()) + +def calc_lr(block): +    len_block = len(block) +    if len_block % 2 == 0: +        return (len_block // 2, len_block // 2) +    else: +        if block.index("L") % 2 == 1: +            return (-(-len_block // 2), len_block // 2) +        else: +            return (len_block // 2, -(-len_block // 2)) + + -ls = [] -for c in s: +ans = [0] * len(s) +for idx, c in enumerate(s): +    if prev == "R" and c == "L": +        idx_pair = (idx - 1, idx) -        ls.append(part) +        left, right = calc_lr(part) +        i, j = idx_pair +        ans[i] = left +        ans[j] = right -ls.append(part) -num_ls = Queue() -for block in ls: -    len_block = len(block) -    if len_block % 2 == 0: -        num_ls.put((len_block // 2, len_block // 2)) -    else: -        if block.index("L") % 2 == 1: -            num_ls.put((-(-len_block // 2), len_block // 2)) -        else: -            num_ls.put((len_block // 2, -(-len_block // 2))) -ans = [0] * len(s) -prev = "" -for i, c in enumerate(s): -    if prev == "R" and c == "L": -        left, right = num_ls.get() -        ans[i - 1] = left -        ans[i] = right -    prev = c +else: +    left, right = calc_lr(part) +    i, j = idx_pair +    ans[i] = left +    ans[j] = right