S = eval(input())

n = len(S)

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

r_st,r_en,l_st,l_en = 0,0,0,0



for i in range(1,n):

    if S[i] == "R":

        if S[i-1] == "L": #L➡R

            l_en = i-1

            rnum = r_en-r_st+1

            lnum = l_en-l_st+1

            if (rnum+lnum)%2 == 0:

                ans[r_en],ans[l_st] = (rnum+lnum)//2,(rnum+lnum)//2

            else:

                evnum = (rnum + lnum + 1) // 2

                odnum = evnum - 1

                if rnum%2 == 0:

                    ans[r_en] = odnum

                    ans[l_st] = evnum

                else:

                    ans[r_en] = evnum

                    ans[l_st] = odnum

            r_st = i

    else:

        if S[i-1] == "R": #R➡L

            r_en = i-1

            l_st = i

        if i == n-1:

            l_en = i

            rnum = r_en-r_st+1

            lnum = l_en-l_st+1

            #print(rnum, lnum)

            if (rnum+lnum)%2 == 0:

                ans[r_en],ans[l_st] = (rnum+lnum)//2,(rnum+lnum)//2

            else:

                evnum = (rnum + lnum + 1) // 2

                odnum = evnum - 1

                if rnum%2 == 0:

                    ans[r_en] = odnum

                    ans[l_st] = evnum

                else:

                    ans[r_en] = evnum

                    ans[l_st] = odnum

            r_st = i

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

n = len(s)

ans = [0]*n

s += "R"

lastl = -1

lastr = 0

for i in range(n):

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

        lastr = i

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

        su = i-lastl

        if su%2 == 0:

            ans[lastr],ans[lastr+1] = su//2,su//2

        else:

            #print((su+1)//2,(su-1)//2)

            ans[lastr],ans[lastr+1] = ((su+1)//2,(su-1)//2) if (lastr-lastl)%2!=0 else ((su-1)//2,(su+1)//2)

        lastl = i

print((*ans))

S = eval(input())
n = len(S)
ans = [0 for i in range(n)]
r_st, r_en, l_st, l_en = 0, 0, 0, 0
for i in range(1, n):
    if S[i] == "R":
        if S[i - 1] == "L":  # L➡R
            l_en = i - 1
            rnum = r_en - r_st + 1
            lnum = l_en - l_st + 1
            if (rnum + lnum) % 2 == 0:
                ans[r_en], ans[l_st] = (rnum + lnum) // 2, (rnum + lnum) // 2
            else:
                evnum = (rnum + lnum + 1) // 2
                odnum = evnum - 1
                if rnum % 2 == 0:
                    ans[r_en] = odnum
                    ans[l_st] = evnum
                else:
                    ans[r_en] = evnum
                    ans[l_st] = odnum
            r_st = i
    else:
        if S[i - 1] == "R":  # R➡L
            r_en = i - 1
            l_st = i
        if i == n - 1:
            l_en = i
            rnum = r_en - r_st + 1
            lnum = l_en - l_st + 1
            # print(rnum, lnum)
            if (rnum + lnum) % 2 == 0:
                ans[r_en], ans[l_st] = (rnum + lnum) // 2, (rnum + lnum) // 2
            else:
                evnum = (rnum + lnum + 1) // 2
                odnum = evnum - 1
                if rnum % 2 == 0:
                    ans[r_en] = odnum
                    ans[l_st] = evnum
                else:
                    ans[r_en] = evnum
                    ans[l_st] = odnum
            r_st = i
print((*ans))

s = eval(input())
n = len(s)
ans = [0] * n
s += "R"
lastl = -1
lastr = 0
for i in range(n):
    if s[i] == "R" and s[i + 1] == "L":
        lastr = i
    if s[i] == "L" and s[i + 1] == "R":
        su = i - lastl
        if su % 2 == 0:
            ans[lastr], ans[lastr + 1] = su // 2, su // 2
        else:
            # print((su+1)//2,(su-1)//2)
            ans[lastr], ans[lastr + 1] = (
                ((su + 1) // 2, (su - 1) // 2)
                if (lastr - lastl) % 2 != 0
                else ((su - 1) // 2, (su + 1) // 2)
            )
        lastl = i
print((*ans))

-S = eval(input()) -n = len(S) -ans = [0 for i in range(n)] -r_st, r_en, l_st, l_en = 0, 0, 0, 0 -for i in range(1, n): -    if S[i] == "R": -        if S[i - 1] == "L":  # L➡R -            l_en = i - 1 -            rnum = r_en - r_st + 1 -            lnum = l_en - l_st + 1 -            if (rnum + lnum) % 2 == 0: -                ans[r_en], ans[l_st] = (rnum + lnum) // 2, (rnum + lnum) // 2 -            else: -                evnum = (rnum + lnum + 1) // 2 -                odnum = evnum - 1 -                if rnum % 2 == 0: -                    ans[r_en] = odnum -                    ans[l_st] = evnum -                else: -                    ans[r_en] = evnum -                    ans[l_st] = odnum -            r_st = i -    else: -        if S[i - 1] == "R":  # R➡L -            r_en = i - 1 -            l_st = i -        if i == n - 1: -            l_en = i -            rnum = r_en - r_st + 1 -            lnum = l_en - l_st + 1 -            # print(rnum, lnum) -            if (rnum + lnum) % 2 == 0: -                ans[r_en], ans[l_st] = (rnum + lnum) // 2, (rnum + lnum) // 2 -            else: -                evnum = (rnum + lnum + 1) // 2 -                odnum = evnum - 1 -                if rnum % 2 == 0: -                    ans[r_en] = odnum -                    ans[l_st] = evnum -                else: -                    ans[r_en] = evnum -                    ans[l_st] = odnum -            r_st = i +s = eval(input()) +n = len(s) +ans = [0] * n +s += "R" +lastl = -1 +lastr = 0 +for i in range(n): +    if s[i] == "R" and s[i + 1] == "L": +        lastr = i +    if s[i] == "L" and s[i + 1] == "R": +        su = i - lastl +        if su % 2 == 0: +            ans[lastr], ans[lastr + 1] = su // 2, su // 2 +        else: +            # print((su+1)//2,(su-1)//2) +            ans[lastr], ans[lastr + 1] = ( +                ((su + 1) // 2, (su - 1) // 2) +                if (lastr - lastl) % 2 != 0 +                else ((su - 1) // 2, (su + 1) // 2) +            ) +        lastl = i