s = eval(input())

n = len(s)



arr = [0 for _ in range(n)]

r_arr = [0 for _ in range(n)]

l_arr = [0 for _ in range(n)]



for i in range(n - 1):

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

        arr[i] += 1

        arr[i + 1] += 1



r_pos = []

for i in range(n - 1):

    if s[i] == "R":

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

            for r in r_pos:

                if (r - i) % 2 == 0:

                    r_arr[i] += 1

                else:

                    r_arr[i + 1] += 1

            r_pos = []

        else:

            r_pos.append(i)

l_pos = []

for i in range(n - 1, 0, -1):

    if s[i] == "L":

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

            for l in l_pos:

                if (l - i) % 2 == 0:

                    l_arr[i] += 1

                else:

                    l_arr[i - 1] += 1

            l_pos = []

        else:

            l_pos.append(i)



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

for i in range(n):

    ans[i] = str(arr[i] + r_arr[i] + l_arr[i])



print((" ".join(ans)))



a = list(eval(input()))

ans = [0] * len(a)

even_r, odd_r = 0, 0

# 正直変数ガチャ

for i in range(len(a)):

    if a[i] == "R":

        if i % 2 == 0:

            odd_r += 1

        else:

            even_r += 1

    else:

        if i % 2 == 0:

            ans[i - 1] += even_r

            ans[i] += odd_r

        else:

            ans[i - 1] += odd_r

            ans[i] += even_r

        odd_r = 0

        even_r = 0

even_l, odd_l = 0, 0

for i in range(len(a) - 1, -1, -1):

    if a[i] == "L":

        if i % 2 == 0:

            odd_l += 1

        else:

            even_l += 1

    else:

        if i % 2 == 0:

            ans[i + 1] += even_l

            ans[i] += odd_l

        else:

            ans[i + 1] += odd_l

            ans[i] += even_l

        odd_l = 0

        even_l = 0

print((" ".join(list(map(str, ans)))))
s = eval(input())
n = len(s)
arr = [0 for _ in range(n)]
r_arr = [0 for _ in range(n)]
l_arr = [0 for _ in range(n)]
for i in range(n - 1):
    if s[i] == "R" and s[i + 1] == "L":
        arr[i] += 1
        arr[i + 1] += 1
r_pos = []
for i in range(n - 1):
    if s[i] == "R":
        if s[i + 1] == "L":
            for r in r_pos:
                if (r - i) % 2 == 0:
                    r_arr[i] += 1
                else:
                    r_arr[i + 1] += 1
            r_pos = []
        else:
            r_pos.append(i)
l_pos = []
for i in range(n - 1, 0, -1):
    if s[i] == "L":
        if s[i - 1] == "R":
            for l in l_pos:
                if (l - i) % 2 == 0:
                    l_arr[i] += 1
                else:
                    l_arr[i - 1] += 1
            l_pos = []
        else:
            l_pos.append(i)
ans = [0 for _ in range(n)]
for i in range(n):
    ans[i] = str(arr[i] + r_arr[i] + l_arr[i])
print((" ".join(ans)))

a = list(eval(input()))
ans = [0] * len(a)
even_r, odd_r = 0, 0
# 正直変数ガチャ
for i in range(len(a)):
    if a[i] == "R":
        if i % 2 == 0:
            odd_r += 1
        else:
            even_r += 1
    else:
        if i % 2 == 0:
            ans[i - 1] += even_r
            ans[i] += odd_r
        else:
            ans[i - 1] += odd_r
            ans[i] += even_r
        odd_r = 0
        even_r = 0
even_l, odd_l = 0, 0
for i in range(len(a) - 1, -1, -1):
    if a[i] == "L":
        if i % 2 == 0:
            odd_l += 1
        else:
            even_l += 1
    else:
        if i % 2 == 0:
            ans[i + 1] += even_l
            ans[i] += odd_l
        else:
            ans[i + 1] += odd_l
            ans[i] += even_l
        odd_l = 0
        even_l = 0
print((" ".join(list(map(str, ans)))))

-s = eval(input()) -n = len(s) -arr = [0 for _ in range(n)] -r_arr = [0 for _ in range(n)] -l_arr = [0 for _ in range(n)] -for i in range(n - 1): -    if s[i] == "R" and s[i + 1] == "L": -        arr[i] += 1 -        arr[i + 1] += 1 -r_pos = [] -for i in range(n - 1): -    if s[i] == "R": -        if s[i + 1] == "L": -            for r in r_pos: -                if (r - i) % 2 == 0: -                    r_arr[i] += 1 -                else: -                    r_arr[i + 1] += 1 -            r_pos = [] +a = list(eval(input())) +ans = [0] * len(a) +even_r, odd_r = 0, 0 +# 正直変数ガチャ +for i in range(len(a)): +    if a[i] == "R": +        if i % 2 == 0: +            odd_r += 1 -            r_pos.append(i) -l_pos = [] -for i in range(n - 1, 0, -1): -    if s[i] == "L": -        if s[i - 1] == "R": -            for l in l_pos: -                if (l - i) % 2 == 0: -                    l_arr[i] += 1 -                else: -                    l_arr[i - 1] += 1 -            l_pos = [] +            even_r += 1 +    else: +        if i % 2 == 0: +            ans[i - 1] += even_r +            ans[i] += odd_r -            l_pos.append(i) -ans = [0 for _ in range(n)] -for i in range(n): -    ans[i] = str(arr[i] + r_arr[i] + l_arr[i]) -print((" ".join(ans))) +            ans[i - 1] += odd_r +            ans[i] += even_r +        odd_r = 0 +        even_r = 0 +even_l, odd_l = 0, 0 +for i in range(len(a) - 1, -1, -1): +    if a[i] == "L": +        if i % 2 == 0: +            odd_l += 1 +        else: +            even_l += 1 +    else: +        if i % 2 == 0: +            ans[i + 1] += even_l +            ans[i] += odd_l +        else: +            ans[i + 1] += odd_l +            ans[i] += even_l +        odd_l = 0 +        even_l = 0 +print((" ".join(list(map(str, ans)))))