S = input().strip()

A = [0 for _ in range(len(S))]

i = 1

while i<len(S):

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

        cur = i-2

        cntR = 0

        while cur>=0:

            if S[cur]=="R":

                cntR += 1

                cur -= 1

            else:

                break

        cur = i+1

        cntL = 0

        while cur<len(S):

            if S[cur]=="L":

                cntL += 1

                cur += 1

            else:

                break

        A[i-1] = 1+cntR//2+(cntL+1)//2

        A[i] = 1+(cntR+1)//2+cntL//2

        i = cur

    i += 1

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()
A = [0 for _ in range(len(S))]
i = 1
while i < len(S):
    if S[i] == "L" and S[i - 1] == "R":
        cur = i - 2
        cntR = 0
        while cur >= 0:
            if S[cur] == "R":
                cntR += 1
                cur -= 1
            else:
                break
        cur = i + 1
        cntL = 0
        while cur < len(S):
            if S[cur] == "L":
                cntL += 1
                cur += 1
            else:
                break
        A[i - 1] = 1 + cntR // 2 + (cntL + 1) // 2
        A[i] = 1 + (cntR + 1) // 2 + cntL // 2
        i = cur
    i += 1
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))

-A = [0 for _ in range(len(S))] -i = 1 -while i < len(S): -    if S[i] == "L" and S[i - 1] == "R": -        cur = i - 2 -        cntR = 0 -        while cur >= 0: -            if S[cur] == "R": -                cntR += 1 -                cur -= 1 -            else: -                break -        cur = i + 1 -        cntL = 0 -        while cur < len(S): -            if S[cur] == "L": -                cntL += 1 -                cur += 1 -            else: -                break -        A[i - 1] = 1 + cntR // 2 + (cntL + 1) // 2 -        A[i] = 1 + (cntR + 1) // 2 + cntL // 2 -        i = cur -    i += 1 -print((*A)) +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))