s = eval(input())

n = len(s)

i = 0

ans = [0] * n

for i in range(n - 1):

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

        j = 0

        while i - j >= 0 and s[i - j] == 'R':

            if j % 2:

                ans[i + 1] += 1

            else:

                ans[i] += 1

            j += 1

        j = 1

        while i + j < n and s[i + j] == 'L':

            if j % 2:

                ans[i + 1] += 1

            else:

                ans[i] += 1

            j += 1

print((' '.join(map(str, ans))))
s = eval(input())

n = len(s)

l = [0]

for i in range(n - 1):

    if s[i] != s[i + 1]:

        l.append(i + 1)

l.append(n)

ans = [0] * n

for i in range(1, len(l) - 1, 2):

    p = l[i] - l[i - 1]

    q = l[i + 1] - l[i]

    ans[l[i] - 1] = (p + 1) // 2 + q // 2

    ans[l[i]] = p // 2 + (q + 1) // 2

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

s = eval(input())
n = len(s)
i = 0
ans = [0] * n
for i in range(n - 1):
    if s[i] == "R" and s[i + 1] == "L":
        j = 0
        while i - j >= 0 and s[i - j] == "R":
            if j % 2:
                ans[i + 1] += 1
            else:
                ans[i] += 1
            j += 1
        j = 1
        while i + j < n and s[i + j] == "L":
            if j % 2:
                ans[i + 1] += 1
            else:
                ans[i] += 1
            j += 1
print((" ".join(map(str, ans))))

s = eval(input())
n = len(s)
l = [0]
for i in range(n - 1):
    if s[i] != s[i + 1]:
        l.append(i + 1)
l.append(n)
ans = [0] * n
for i in range(1, len(l) - 1, 2):
    p = l[i] - l[i - 1]
    q = l[i + 1] - l[i]
    ans[l[i] - 1] = (p + 1) // 2 + q // 2
    ans[l[i]] = p // 2 + (q + 1) // 2
print((" ".join(map(str, ans))))

-i = 0 +l = [0] +for i in range(n - 1): +    if s[i] != s[i + 1]: +        l.append(i + 1) +l.append(n) -for i in range(n - 1): -    if s[i] == "R" and s[i + 1] == "L": -        j = 0 -        while i - j >= 0 and s[i - j] == "R": -            if j % 2: -                ans[i + 1] += 1 -            else: -                ans[i] += 1 -            j += 1 -        j = 1 -        while i + j < n and s[i + j] == "L": -            if j % 2: -                ans[i + 1] += 1 -            else: -                ans[i] += 1 -            j += 1 +for i in range(1, len(l) - 1, 2): +    p = l[i] - l[i - 1] +    q = l[i + 1] - l[i] +    ans[l[i] - 1] = (p + 1) // 2 + q // 2 +    ans[l[i]] = p // 2 + (q + 1) // 2