Buggy python submission (verdict: Time Limit Exceeded):
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
CL=[0]*TL #子供の座標

for j in range(TL):
  i=j
  hozon=j
  if SL[i]=="R":
   
    while True:
      if SL[i]=="L":
        index=i
        #print(index)
        break
      i=i+1
    idou=index-hozon
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index-1
  else:
  
    while True:
      if SL[i]=="R":
        index=i
        #print(index)
        break
      i=i-1
    idou=hozon-index
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index+1
for i in range(TL):
  BL[i]=CL.count(i)
print(*BL)

Fixed submission:
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
ans=[0]*TL #子供の座標
cnt=0
for j in range(2):
  for i in range(TL):
    
    if SL[i]=="R":
      cnt=cnt+1
    else:
      ans[i]=ans[i]+cnt//2
      ans[i-1]=ans[i-1]+(cnt+1)//2
      cnt=0
    
  SL.reverse()
  ans.reverse()
  for i in range(TL):
    if SL[i]=="R":
      SL[i]="L"
    else:
      SL[i]="R" 
for i in range(TL):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=list(1 for i in range(TL))
CL=list(i for i in range(TL)) #子供の座標

for j in range(TL):
  i=j
  hozon=j
  if SL[i]=="R":
   
    while True:
      if SL[i]=="L":
        index=i
        #print(index)
        break
      i=i+1
    idou=index-hozon
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index-1
  else:
  
    while True:
      if SL[i]=="R":
        index=i
        #print(index)
        break
      i=i-1
    idou=hozon-index
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index+1
for i in range(TL):
  BL[i]=CL.count(i)
print(*BL)

Fixed submission:
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
ans=[0]*TL #子供の座標
cnt=0
for j in range(2):
  for i in range(TL):
    
    if SL[i]=="R":
      cnt=cnt+1
    else:
      ans[i]=ans[i]+cnt//2
      ans[i-1]=ans[i-1]+(cnt+1)//2
      cnt=0
    
  SL.reverse()
  ans.reverse()
  for i in range(TL):
    if SL[i]=="R":
      SL[i]="L"
    else:
      SL[i]="R" 
for i in range(TL):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=list(1 for i in range(TL))
CL=list(i for i in range(TL)) #子供の座標

for j in range(TL):
  i=j
  hozon=j
  if SL[i]=="R":
   
    while True:
      if SL[i]=="L":
        index=i
        #print(index)
        break
      i=i+1
    idou=index-hozon
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index-1
  else:
  
    while True:
      if SL[i]=="R":
        index=i
        #print(index)
        break
      i=i-1
    idou=hozon-index
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index+1
for i in range(TL):
  BL[i]=CL.count(i)
print(*BL)

Fixed submission:
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
ans=[0]*TL #子供の座標
cnt=0
for j in range(2):
  for i in range(TL):
    
    if SL[i]=="R":
      cnt=cnt+1
    else:
      ans[i]=ans[i]+cnt//2
      ans[i-1]=ans[i-1]+(cnt+1)//2
      cnt=0
    
  SL.reverse()
  ans.reverse()
  for i in range(TL):
    if SL[i]=="R":
      SL[i]="L"
    else:
      SL[i]="R" 
for i in range(TL):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
C=10**100
S=input()
SL=list(S[i] for i in range(len(S)))#床の情報
BL=list(1 for i in range(len(S)))
CL=list(i for i in range(len(S))) #子供の座標

for j in range(len(S)):
  i=j
  hozon=j
  if SL[i]=="R":
   
    while True:
      if SL[i]=="L":
        index=i
        #print(index)
        break
      i=i+1
    idou=index-hozon
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index-1
  else:
  
    while True:
      if SL[i]=="R":
        index=i
        #print(index)
        break
      i=i-1
    idou=hozon-index
    if idou%2==0:
      CL[hozon]=index
    else:
      CL[hozon]=index+1
for i in range(len(S)):
  BL[i]=CL.count(i)
print(*BL)

Fixed submission:
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
ans=[0]*TL #子供の座標
cnt=0
for j in range(2):
  for i in range(TL):
    
    if SL[i]=="R":
      cnt=cnt+1
    else:
      ans[i]=ans[i]+cnt//2
      ans[i-1]=ans[i-1]+(cnt+1)//2
      cnt=0
    
  SL.reverse()
  ans.reverse()
  for i in range(TL):
    if SL[i]=="R":
      SL[i]="L"
    else:
      SL[i]="R" 
for i in range(TL):
  print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
C=10**100
S=input()
SL=list(S[i] for i in range(len(S)))#床の情報
BL=list(1 for i in range(len(S)))
CL=list(i for i in range(len(S))) #子供の座標
for i in range(C):
  
  for child in range(len(S)):
    houkou=SL[CL[child]]
    if houkou=="L":
      CL[child]=CL[child]-1
    else:
      CL[child]=CL[child]+1
for i in range(len(S)):
  BL[i]=CL.count(i)
print(BL)

Fixed submission:
S=input()
TL=len(S)
SL=list(S[i] for i in range(TL))#床の情報
BL=[0]*TL
ans=[0]*TL #子供の座標
cnt=0
for j in range(2):
  for i in range(TL):
    
    if SL[i]=="R":
      cnt=cnt+1
    else:
      ans[i]=ans[i]+cnt//2
      ans[i-1]=ans[i-1]+(cnt+1)//2
      cnt=0
    
  SL.reverse()
  ans.reverse()
  for i in range(TL):
    if SL[i]=="R":
      SL[i]="L"
    else:
      SL[i]="R" 
for i in range(TL):
  print(ans[i])