import sys



s = eval(input())

n = len(s)

l = [0] * n

reverse_s = ''.join(list(reversed(s)))



for i in range(n):

	state = i

	count = 0

	while True:

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

			if count % 2 == 0:

				l[state] += 1

			else:

				l[state+1] += 1

			break

		elif s[state] == 'L' and s[state-1] == 'R':

			if count % 2 == 0:

				l[state] += 1

			else:

				l[state-1] += 1

			break

		elif s[state] == 'R' and s[state+1] == 'R':

			tmp = s.find('L',state,n) - state

			state += tmp

			count += tmp

		elif s[state] == 'L' and s[state-1] == 'L':

			tmp = reverse_s.find('R',n-state,n) - (n - state)

			state -= tmp

			count += tmp

		else:

			print('error')

			break



for i in range(n):

	sys.stdout.write(str(l[i]))

	if i != n-1:

		sys.stdout.write(" ")
import sys

readline = sys.stdin.readline



def main():

	s = eval(input())

	n = len(s)



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

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

	for i in range(n):

		if s[i] == 'L' and s[i-1] == 'L':

			field[i] = field[i-1] + 1



	for i in reversed(list(range(n))):

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

			field[i] = field[i+1] + 1



	for i in range(n):

		if s[i] == 'L':

			if field[i] % 2 == 0:

				ans[i - field[i]] += 1

			else:

				ans[i - field[i] - 1] += 1

		else:

			if field[i] % 2 == 0:

				ans[i + field[i]] += 1

			else:

				ans[i + field[i] + 1] += 1



	ans = [str(i) for i in ans]

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



if __name__ == '__main__':

	main()
import sys

s = eval(input())
n = len(s)
l = [0] * n
reverse_s = "".join(list(reversed(s)))
for i in range(n):
    state = i
    count = 0
    while True:
        if s[state] == "R" and s[state + 1] == "L":
            if count % 2 == 0:
                l[state] += 1
            else:
                l[state + 1] += 1
            break
        elif s[state] == "L" and s[state - 1] == "R":
            if count % 2 == 0:
                l[state] += 1
            else:
                l[state - 1] += 1
            break
        elif s[state] == "R" and s[state + 1] == "R":
            tmp = s.find("L", state, n) - state
            state += tmp
            count += tmp
        elif s[state] == "L" and s[state - 1] == "L":
            tmp = reverse_s.find("R", n - state, n) - (n - state)
            state -= tmp
            count += tmp
        else:
            print("error")
            break
for i in range(n):
    sys.stdout.write(str(l[i]))
    if i != n - 1:
        sys.stdout.write(" ")

import sys

readline = sys.stdin.readline


def main():
    s = eval(input())
    n = len(s)
    ans = [0 for _ in range(n)]
    field = [0 for _ in range(n)]
    for i in range(n):
        if s[i] == "L" and s[i - 1] == "L":
            field[i] = field[i - 1] + 1
    for i in reversed(list(range(n))):
        if s[i] == "R" and s[i + 1] == "R":
            field[i] = field[i + 1] + 1
    for i in range(n):
        if s[i] == "L":
            if field[i] % 2 == 0:
                ans[i - field[i]] += 1
            else:
                ans[i - field[i] - 1] += 1
        else:
            if field[i] % 2 == 0:
                ans[i + field[i]] += 1
            else:
                ans[i + field[i] + 1] += 1
    ans = [str(i) for i in ans]
    print((" ".join(ans)))


if __name__ == "__main__":
    main()

-s = eval(input()) -n = len(s) -l = [0] * n -reverse_s = "".join(list(reversed(s))) -for i in range(n): -    state = i -    count = 0 -    while True: -        if s[state] == "R" and s[state + 1] == "L": -            if count % 2 == 0: -                l[state] += 1 +readline = sys.stdin.readline + + +def main(): +    s = eval(input()) +    n = len(s) +    ans = [0 for _ in range(n)] +    field = [0 for _ in range(n)] +    for i in range(n): +        if s[i] == "L" and s[i - 1] == "L": +            field[i] = field[i - 1] + 1 +    for i in reversed(list(range(n))): +        if s[i] == "R" and s[i + 1] == "R": +            field[i] = field[i + 1] + 1 +    for i in range(n): +        if s[i] == "L": +            if field[i] % 2 == 0: +                ans[i - field[i]] += 1 -                l[state + 1] += 1 -            break -        elif s[state] == "L" and s[state - 1] == "R": -            if count % 2 == 0: -                l[state] += 1 +                ans[i - field[i] - 1] += 1 +        else: +            if field[i] % 2 == 0: +                ans[i + field[i]] += 1 -                l[state - 1] += 1 -            break -        elif s[state] == "R" and s[state + 1] == "R": -            tmp = s.find("L", state, n) - state -            state += tmp -            count += tmp -        elif s[state] == "L" and s[state - 1] == "L": -            tmp = reverse_s.find("R", n - state, n) - (n - state) -            state -= tmp -            count += tmp -        else: -            print("error") -            break -for i in range(n): -    sys.stdout.write(str(l[i])) -    if i != n - 1: -        sys.stdout.write(" ") +                ans[i + field[i] + 1] += 1 +    ans = [str(i) for i in ans] +    print((" ".join(ans))) + + +if __name__ == "__main__": +    main()