Buggy python submission (verdict: Runtime Error):
#print('RRRLLRL'.index('LR'))
#print('RRRLLRLR'.index('LR'))
#=>4
#str.index(検索文字列,開始位置,終了位置)

#indexは見つからないとエラー
#findは見つからないと-1を出力

#s='RRLRLR'
#bubun=s[0:3]
#print(bubun)
#=>RRL


def stateRL(s):
	state=[0]*len(s)
	r=s.count('R')
	l=s.count('L')
	state[r-1]=1+(r-1)//2+l//2
	state[r]=1+r//2+(l-1)//2
	return state

s=input()
n=len(s)

state=[]

kireme=-1
nkireme=s.find('LR',0)

while nkireme!=-1:
	bubun=s[kireme+1:nkireme+1:]
	state+=stateRL(bubun)
	kireme=nkireme
	nkireme=s.find('LR',kireme+1)

bubun=s[kireme::]
state+=stateRL(bubun)
	
for i in range(n):
	print(state[i],end=' ')

Fixed submission:
#print('RRRLLRL'.index('LR'))
#print('RRRLLRLR'.index('LR'))
#=>4
#str.index(検索文字列,開始位置,終了位置)

#indexは見つからないとエラー
#findは見つからないと-1を出力

#s='RRLRLR'
#bubun=s[0:3]
#print(bubun)
#=>RRL


def stateRL(s):
	state=[0]*len(s)
	r=s.count('R')
	l=s.count('L')
	state[r-1]=1+(r-1)//2+l//2
	state[r]=1+r//2+(l-1)//2
	return state

s=input()
n=len(s)

state=[]

kireme=-1
nkireme=s.find('LR',0)

while nkireme!=-1:
	bubun=s[kireme+1:nkireme+1:]
	state+=stateRL(bubun)
	kireme=nkireme
	nkireme=s.find('LR',kireme+1)

bubun=s[kireme+1::]
state+=stateRL(bubun)
	
for i in range(n):
	print(state[i],end=' ')

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
n=len(s)

#sのあるindexに、ある操作回数後にいる人の数を格納する配列を準備する。はじめはすべてのマスに1人
state=[0 for i in range(n)]

def countR(i): 
	count=0
	j=i
	while s[j]=='R':
		count+=1
		j+=1
	return count

def countL(i):
	count=0
	j=i
	while s[j]=='L':
		count+=1
		j-=1
	return count
	
for i in range(n):
	if s[i]=='R':
		state[i+countR(i)-(countR(i)%2==1)]+=1
	if s[i]=='L':
		state[i-countL(i)+(countL(i)%2==1)]+=1
		
for i in range(n):
	print(state[i],end=' ')

Fixed submission:
#print('RRRLLRL'.index('LR'))
#print('RRRLLRLR'.index('LR'))
#=>4
#str.index(検索文字列,開始位置,終了位置)

#indexは見つからないとエラー
#findは見つからないと-1を出力

#s='RRLRLR'
#bubun=s[0:3]
#print(bubun)
#=>RRL


def stateRL(s):
	state=[0]*len(s)
	r=s.count('R')
	l=s.count('L')
	state[r-1]=1+(r-1)//2+l//2
	state[r]=1+r//2+(l-1)//2
	return state

s=input()
n=len(s)

state=[]

kireme=-1
nkireme=s.find('LR',0)

while nkireme!=-1:
	bubun=s[kireme+1:nkireme+1:]
	state+=stateRL(bubun)
	kireme=nkireme
	nkireme=s.find('LR',kireme+1)

bubun=s[kireme+1::]
state+=stateRL(bubun)
	
for i in range(n):
	print(state[i],end=' ')

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
n=len(s)

#sのあるindexに、ある操作回数後にいる人の数を格納する配列を準備する。はじめはすべてのマスに1人
state=[[1 for i in range(n)],[1 for i in range(n)]]
#state[移動の前（0）か後（1）か][index]

for t in range(10**5):
	for i in range(n):
		if i==0:
			state[1][i]=(s[i+1]=='L')*state[0][i+1]
		elif i==n-1:
			state[1][i]=(s[i-1]=='R')*state[0][i-1]
		else:
			state[1][i]=(s[i-1]=='R')*state[0][i-1]+(s[i+1]=='L')*state[0][i+1]
	for i in range(n):
		state[0][i]=state[1][i]

for i in range(n):
	print(state[0][i],end=' ')

Fixed submission:
#print('RRRLLRL'.index('LR'))
#print('RRRLLRLR'.index('LR'))
#=>4
#str.index(検索文字列,開始位置,終了位置)

#indexは見つからないとエラー
#findは見つからないと-1を出力

#s='RRLRLR'
#bubun=s[0:3]
#print(bubun)
#=>RRL


def stateRL(s):
	state=[0]*len(s)
	r=s.count('R')
	l=s.count('L')
	state[r-1]=1+(r-1)//2+l//2
	state[r]=1+r//2+(l-1)//2
	return state

s=input()
n=len(s)

state=[]

kireme=-1
nkireme=s.find('LR',0)

while nkireme!=-1:
	bubun=s[kireme+1:nkireme+1:]
	state+=stateRL(bubun)
	kireme=nkireme
	nkireme=s.find('LR',kireme+1)

bubun=s[kireme+1::]
state+=stateRL(bubun)
	
for i in range(n):
	print(state[i],end=' ')