S = input().strip()

N = len(S)

A = []

cur = 0

for i in range(1,N):

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

        x = S[cur:i]

        A.append((cur,x))

        cur = i

A.append((cur,S[cur:N]))

B = [0 for _ in range(N)]

while A:

    cur,x = A.pop()

    n = len(x)

    for i in range(1,n):

        if x[i]=="L" and x[i-1]=="R":

            ind = i

            break

    if n%2==0:

        B[cur+ind]=n//2

        B[cur+ind-1]=n//2

    else:

        if ind%2==0:

            B[cur+ind] = (n+1)//2

            B[cur+ind-1]=n//2

        else:

            B[cur+ind] = n//2

            B[cur+ind-1]=(n+1)//2

print((*B))
S = input().strip()

N = len(S)

A = [0 for _ in range(N)]

flag = 0

curR = 0

for i in range(N):

    if flag==0 and S[i]=="L":

        curL = i

        nR = i-curR

        flag = 1

    if flag==1 and S[i]=="R":

        curR = i

        nL = i-curL

        flag = 0

        if (nR+nL)%2==0:

            A[curL-1]=(nR+nL)//2

            A[curL] = (nR+nL)//2

        else:

            if nR>nL and (nR-1)%2==0:

                A[curL-1]=(nR+nL+1)//2

                A[curL] = (nR+nL)//2

            elif nR>nL and (nR-1)%2==1:

                A[curL-1]=(nR+nL)//2

                A[curL] = (nR+nL+1)//2

            elif nL>nR and (nL-1)%2==0:

                A[curL-1]=(nR+nL)//2

                A[curL]=(nR+nL+1)//2

            elif nL>nR and (nL-1)%2==1:

                A[curL-1]=(nR+nL+1)//2

                A[curL]=(nR+nL)//2

nL = N-curL

if (nR+nL)%2==0:

    A[curL-1]=(nR+nL)//2

    A[curL] = (nR+nL)//2

else:

    if nR>nL and (nR-1)%2==0:

        A[curL-1]=(nR+nL+1)//2

        A[curL] = (nR+nL)//2

    elif nR>nL and (nR-1)%2==1:

        A[curL-1]=(nR+nL)//2

        A[curL] = (nR+nL+1)//2

    elif nL>nR and (nL-1)%2==0:

        A[curL-1]=(nR+nL)//2

        A[curL]=(nR+nL+1)//2

    elif nL>nR and (nL-1)%2==1:

        A[curL-1]=(nR+nL+1)//2

        A[curL]=(nR+nL)//2

print((*A))
S = input().strip()
N = len(S)
A = []
cur = 0
for i in range(1, N):
    if S[i] == "R" and S[i - 1] == "L":
        x = S[cur:i]
        A.append((cur, x))
        cur = i
A.append((cur, S[cur:N]))
B = [0 for _ in range(N)]
while A:
    cur, x = A.pop()
    n = len(x)
    for i in range(1, n):
        if x[i] == "L" and x[i - 1] == "R":
            ind = i
            break
    if n % 2 == 0:
        B[cur + ind] = n // 2
        B[cur + ind - 1] = n // 2
    else:
        if ind % 2 == 0:
            B[cur + ind] = (n + 1) // 2
            B[cur + ind - 1] = n // 2
        else:
            B[cur + ind] = n // 2
            B[cur + ind - 1] = (n + 1) // 2
print((*B))

S = input().strip()
N = len(S)
A = [0 for _ in range(N)]
flag = 0
curR = 0
for i in range(N):
    if flag == 0 and S[i] == "L":
        curL = i
        nR = i - curR
        flag = 1
    if flag == 1 and S[i] == "R":
        curR = i
        nL = i - curL
        flag = 0
        if (nR + nL) % 2 == 0:
            A[curL - 1] = (nR + nL) // 2
            A[curL] = (nR + nL) // 2
        else:
            if nR > nL and (nR - 1) % 2 == 0:
                A[curL - 1] = (nR + nL + 1) // 2
                A[curL] = (nR + nL) // 2
            elif nR > nL and (nR - 1) % 2 == 1:
                A[curL - 1] = (nR + nL) // 2
                A[curL] = (nR + nL + 1) // 2
            elif nL > nR and (nL - 1) % 2 == 0:
                A[curL - 1] = (nR + nL) // 2
                A[curL] = (nR + nL + 1) // 2
            elif nL > nR and (nL - 1) % 2 == 1:
                A[curL - 1] = (nR + nL + 1) // 2
                A[curL] = (nR + nL) // 2
nL = N - curL
if (nR + nL) % 2 == 0:
    A[curL - 1] = (nR + nL) // 2
    A[curL] = (nR + nL) // 2
else:
    if nR > nL and (nR - 1) % 2 == 0:
        A[curL - 1] = (nR + nL + 1) // 2
        A[curL] = (nR + nL) // 2
    elif nR > nL and (nR - 1) % 2 == 1:
        A[curL - 1] = (nR + nL) // 2
        A[curL] = (nR + nL + 1) // 2
    elif nL > nR and (nL - 1) % 2 == 0:
        A[curL - 1] = (nR + nL) // 2
        A[curL] = (nR + nL + 1) // 2
    elif nL > nR and (nL - 1) % 2 == 1:
        A[curL - 1] = (nR + nL + 1) // 2
        A[curL] = (nR + nL) // 2
print((*A))

-A = [] -cur = 0 -for i in range(1, N): -    if S[i] == "R" and S[i - 1] == "L": -        x = S[cur:i] -        A.append((cur, x)) -        cur = i -A.append((cur, S[cur:N])) -B = [0 for _ in range(N)] -while A: -    cur, x = A.pop() -    n = len(x) -    for i in range(1, n): -        if x[i] == "L" and x[i - 1] == "R": -            ind = i -            break -    if n % 2 == 0: -        B[cur + ind] = n // 2 -        B[cur + ind - 1] = n // 2 -    else: -        if ind % 2 == 0: -            B[cur + ind] = (n + 1) // 2 -            B[cur + ind - 1] = n // 2 +A = [0 for _ in range(N)] +flag = 0 +curR = 0 +for i in range(N): +    if flag == 0 and S[i] == "L": +        curL = i +        nR = i - curR +        flag = 1 +    if flag == 1 and S[i] == "R": +        curR = i +        nL = i - curL +        flag = 0 +        if (nR + nL) % 2 == 0: +            A[curL - 1] = (nR + nL) // 2 +            A[curL] = (nR + nL) // 2 -            B[cur + ind] = n // 2 -            B[cur + ind - 1] = (n + 1) // 2 -print((*B)) +            if nR > nL and (nR - 1) % 2 == 0: +                A[curL - 1] = (nR + nL + 1) // 2 +                A[curL] = (nR + nL) // 2 +            elif nR > nL and (nR - 1) % 2 == 1: +                A[curL - 1] = (nR + nL) // 2 +                A[curL] = (nR + nL + 1) // 2 +            elif nL > nR and (nL - 1) % 2 == 0: +                A[curL - 1] = (nR + nL) // 2 +                A[curL] = (nR + nL + 1) // 2 +            elif nL > nR and (nL - 1) % 2 == 1: +                A[curL - 1] = (nR + nL + 1) // 2 +                A[curL] = (nR + nL) // 2 +nL = N - curL +if (nR + nL) % 2 == 0: +    A[curL - 1] = (nR + nL) // 2 +    A[curL] = (nR + nL) // 2 +else: +    if nR > nL and (nR - 1) % 2 == 0: +        A[curL - 1] = (nR + nL + 1) // 2 +        A[curL] = (nR + nL) // 2 +    elif nR > nL and (nR - 1) % 2 == 1: +        A[curL - 1] = (nR + nL) // 2 +        A[curL] = (nR + nL + 1) // 2 +    elif nL > nR and (nL - 1) % 2 == 0: +        A[curL - 1] = (nR + nL) // 2 +        A[curL] = (nR + nL + 1) // 2 +    elif nL > nR and (nL - 1) % 2 == 1: +        A[curL - 1] = (nR + nL + 1) // 2 +        A[curL] = (nR + nL) // 2 +print((*A))