import numpy as np

from scipy.sparse import csr_matrix

s = np.array(list(eval(input())), dtype='U1')

n = len(s)

child = np.ones(n, dtype=np.int32)

rows = np.arange(n)

cols = np.where(s == 'R', rows+1, rows-1)

x = csr_matrix((np.ones(n, dtype=np.int32), (rows, cols)), (n, n))





def power(x, n):

    if n == 1:

        return x

    y = power(x, n//2)

    y = y*y

    return x*y if n & 1 else y





x = power(x, 10**100)

print((*(child*x)))
def main():

    S = eval(input())

    N = len(S)

    now = 0

    ans = [0]*N

    for i in range(N):

        if S[i] == "R":

            now += 1

        else:

            ans[i] += now//2

            if i != 0:

                ans[i-1] += int(0--now//2)

            now = 0



    now = 0

    for i in range(N-1, -1, -1):

        if S[i] == "L":

            now += 1

        else:

            ans[i] += now//2

            if i != N-1:

                ans[i+1] += int(0--now//2)

            now = 0

    print((*ans))





if __name__ == '__main__':

    main()

import numpy as np
from scipy.sparse import csr_matrix

s = np.array(list(eval(input())), dtype="U1")
n = len(s)
child = np.ones(n, dtype=np.int32)
rows = np.arange(n)
cols = np.where(s == "R", rows + 1, rows - 1)
x = csr_matrix((np.ones(n, dtype=np.int32), (rows, cols)), (n, n))


def power(x, n):
    if n == 1:
        return x
    y = power(x, n // 2)
    y = y * y
    return x * y if n & 1 else y


x = power(x, 10**100)
print((*(child * x)))

def main():
    S = eval(input())
    N = len(S)
    now = 0
    ans = [0] * N
    for i in range(N):
        if S[i] == "R":
            now += 1
        else:
            ans[i] += now // 2
            if i != 0:
                ans[i - 1] += int(0 - -now // 2)
            now = 0
    now = 0
    for i in range(N - 1, -1, -1):
        if S[i] == "L":
            now += 1
        else:
            ans[i] += now // 2
            if i != N - 1:
                ans[i + 1] += int(0 - -now // 2)
            now = 0
    print((*ans))


if __name__ == "__main__":
    main()

-import numpy as np -from scipy.sparse import csr_matrix - -s = np.array(list(eval(input())), dtype="U1") -n = len(s) -child = np.ones(n, dtype=np.int32) -rows = np.arange(n) -cols = np.where(s == "R", rows + 1, rows - 1) -x = csr_matrix((np.ones(n, dtype=np.int32), (rows, cols)), (n, n)) +def main(): +    S = eval(input()) +    N = len(S) +    now = 0 +    ans = [0] * N +    for i in range(N): +        if S[i] == "R": +            now += 1 +        else: +            ans[i] += now // 2 +            if i != 0: +                ans[i - 1] += int(0 - -now // 2) +            now = 0 +    now = 0 +    for i in range(N - 1, -1, -1): +        if S[i] == "L": +            now += 1 +        else: +            ans[i] += now // 2 +            if i != N - 1: +                ans[i + 1] += int(0 - -now // 2) +            now = 0 +    print((*ans)) -def power(x, n): -    if n == 1: -        return x -    y = power(x, n // 2) -    y = y * y -    return x * y if n & 1 else y - - -x = power(x, 10**100) -print((*(child * x))) +if __name__ == "__main__": +    main()