s = input() + "R"

v = [0 for i in range(len(s)-1)]



even = 0

odd = 0

lrpos = 0

lr = "R"



for i in range(len(s)):

    if lr != s[i]:

        if lr == "R":

            if even == odd:

                v[i-1] += even

                v[i] += odd

            else:

                v[i] += even

                v[i-1] += odd

        else:

            if even == odd:

                v[lrpos] += even

                v[lrpos-1] += odd

            else:

                v[lrpos-1] += even

                v[lrpos] += odd

        

        odd = 0

        even = 0

        lr = s[i]

        lrpos = i



    if even < odd:

        even += 1

    else:

        odd += 1

    

for i in v:

    print(str(i) + " ",end="")

s = eval(input())

ans = [0] * len(s)

cnt = 1

prev = -1

for i in range(1,len(s)+1):

    if i == len(s) or s[i] != s[i-1]:

        if s[i-1] == "L":

            ans[prev-1] += cnt // 2

            ans[prev] += (cnt+1) // 2

        else:

            ans[i] += cnt // 2

            ans[i-1] += (cnt+1) // 2

        prev = i

        cnt = 1

    else:

        cnt += 1



print((" ".join(map(str,ans))))

s = input() + "R"
v = [0 for i in range(len(s) - 1)]
even = 0
odd = 0
lrpos = 0
lr = "R"
for i in range(len(s)):
    if lr != s[i]:
        if lr == "R":
            if even == odd:
                v[i - 1] += even
                v[i] += odd
            else:
                v[i] += even
                v[i - 1] += odd
        else:
            if even == odd:
                v[lrpos] += even
                v[lrpos - 1] += odd
            else:
                v[lrpos - 1] += even
                v[lrpos] += odd
        odd = 0
        even = 0
        lr = s[i]
        lrpos = i
    if even < odd:
        even += 1
    else:
        odd += 1
for i in v:
    print(str(i) + " ", end="")

s = eval(input())
ans = [0] * len(s)
cnt = 1
prev = -1
for i in range(1, len(s) + 1):
    if i == len(s) or s[i] != s[i - 1]:
        if s[i - 1] == "L":
            ans[prev - 1] += cnt // 2
            ans[prev] += (cnt + 1) // 2
        else:
            ans[i] += cnt // 2
            ans[i - 1] += (cnt + 1) // 2
        prev = i
        cnt = 1
    else:
        cnt += 1
print((" ".join(map(str, ans))))

-s = input() + "R" -v = [0 for i in range(len(s) - 1)] -even = 0 -odd = 0 -lrpos = 0 -lr = "R" -for i in range(len(s)): -    if lr != s[i]: -        if lr == "R": -            if even == odd: -                v[i - 1] += even -                v[i] += odd -            else: -                v[i] += even -                v[i - 1] += odd +s = eval(input()) +ans = [0] * len(s) +cnt = 1 +prev = -1 +for i in range(1, len(s) + 1): +    if i == len(s) or s[i] != s[i - 1]: +        if s[i - 1] == "L": +            ans[prev - 1] += cnt // 2 +            ans[prev] += (cnt + 1) // 2 -            if even == odd: -                v[lrpos] += even -                v[lrpos - 1] += odd -            else: -                v[lrpos - 1] += even -                v[lrpos] += odd -        odd = 0 -        even = 0 -        lr = s[i] -        lrpos = i -    if even < odd: -        even += 1 +            ans[i] += cnt // 2 +            ans[i - 1] += (cnt + 1) // 2 +        prev = i +        cnt = 1 -        odd += 1 -for i in v: -    print(str(i) + " ", end="") +        cnt += 1 +print((" ".join(map(str, ans))))