s = eval(input())

ans = [0] * len(s)

x = 0

y = 'R'

z = []

for i in s:

    if y == i:

        x += 1

    else:

        z.append([y,x])

        x = 1

        y = i

z.append([y,x])

ans = [0] * len(s)

i = 0

j = 0

while i < len(z):

    x = z[i][1]

    if z[i][0] == 'R':

        j += x-1

        if x % 2 == 0:

            ans[j] += x // 2

        else:

            ans[j] += x // 2 + 1

        ans[j+1] += x // 2

        j -= x-1

        j += x

    if z[i][0] == 'L':

        if x % 2 == 0:

            ans[j] += x // 2

        else:

            ans[j] += x // 2 + 1

        ans[j-1] += x // 2

        j += x

    i += 1

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

x = 0

y = 'R'

rle = []

for c in s:

    if y == c:

        x += 1

    else:

        rle.append(x)

        x = 1

        y = c

rle.append(x)

ans = [0] * len(s)

i = 0

y = 'R'

for c in rle:

    if y == 'R':

        j = i + c - 1

        if c % 2 == 0:

            ans[j] += c // 2

        else:

            ans[j] += c // 2 + 1

        ans[j+1] += c // 2

        i += c

        y = 'L'

    else:

        if c % 2 == 0:

            ans[i] += c // 2

        else:

            ans[i] += c // 2 + 1

        ans[i-1] += c // 2

        i += c

        y = 'R'

print((' '.join(map(str,ans))))
s = eval(input())
ans = [0] * len(s)
x = 0
y = "R"
z = []
for i in s:
    if y == i:
        x += 1
    else:
        z.append([y, x])
        x = 1
        y = i
z.append([y, x])
ans = [0] * len(s)
i = 0
j = 0
while i < len(z):
    x = z[i][1]
    if z[i][0] == "R":
        j += x - 1
        if x % 2 == 0:
            ans[j] += x // 2
        else:
            ans[j] += x // 2 + 1
        ans[j + 1] += x // 2
        j -= x - 1
        j += x
    if z[i][0] == "L":
        if x % 2 == 0:
            ans[j] += x // 2
        else:
            ans[j] += x // 2 + 1
        ans[j - 1] += x // 2
        j += x
    i += 1
print((" ".join(map(str, ans))))

s = eval(input())
x = 0
y = "R"
rle = []
for c in s:
    if y == c:
        x += 1
    else:
        rle.append(x)
        x = 1
        y = c
rle.append(x)
ans = [0] * len(s)
i = 0
y = "R"
for c in rle:
    if y == "R":
        j = i + c - 1
        if c % 2 == 0:
            ans[j] += c // 2
        else:
            ans[j] += c // 2 + 1
        ans[j + 1] += c // 2
        i += c
        y = "L"
    else:
        if c % 2 == 0:
            ans[i] += c // 2
        else:
            ans[i] += c // 2 + 1
        ans[i - 1] += c // 2
        i += c
        y = "R"
print((" ".join(map(str, ans))))

-ans = [0] * len(s) -z = [] -for i in s: -    if y == i: +rle = [] +for c in s: +    if y == c: -        z.append([y, x]) +        rle.append(x) -        y = i -z.append([y, x]) +        y = c +rle.append(x) -j = 0 -while i < len(z): -    x = z[i][1] -    if z[i][0] == "R": -        j += x - 1 -        if x % 2 == 0: -            ans[j] += x // 2 +y = "R" +for c in rle: +    if y == "R": +        j = i + c - 1 +        if c % 2 == 0: +            ans[j] += c // 2 -            ans[j] += x // 2 + 1 -        ans[j + 1] += x // 2 -        j -= x - 1 -        j += x -    if z[i][0] == "L": -        if x % 2 == 0: -            ans[j] += x // 2 +            ans[j] += c // 2 + 1 +        ans[j + 1] += c // 2 +        i += c +        y = "L" +    else: +        if c % 2 == 0: +            ans[i] += c // 2 -            ans[j] += x // 2 + 1 -        ans[j - 1] += x // 2 -        j += x -    i += 1 +            ans[i] += c // 2 + 1 +        ans[i - 1] += c // 2 +        i += c +        y = "R"