Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

import sys

s0=[]
for i,c in enumerate(sys.stdin.readline().strip()):
    if c=="L": s0.append(i-1)
    if c=="R": s0.append(i+1)
n= len(s0)
#
table=[1,100,104,105,106,107,111,113,114,115,117,123,125,127,131,136,137,142,145,148,149,151,153,155,157,159,162,163,164,165,166,169,171,172,176,181,185,186,187,191,198,201,202,203,206,207,209,211,215,216,217,220,221,222,223,224,225,227,233,234,235,238,239,242,246,247,250,255,256,257,258,261,264,265,267,272,273,275,277,278,279,282,283,284,285,286,288,289,294,295,298,300,303,304,306,309,312,314,315,317,319,320,323,326,329,332]

now= [ i for i in range(n) ]
prev= s0
for i in range(1,333):
    nxt = [ prev[i] for i in prev ]
    if i in table: now= [ nxt[now[j]] for j in range(n) ]
    prev= nxt
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
for i in range(n): print( ans[i],end=" " )
    


Fixed submission:
import sys

s0=[]
for i,c in enumerate(sys.stdin.readline().strip()):
    if c=="L": s0.append(i-1)
    if c=="R": s0.append(i+1)
n= len(s0)
#
now= [ i for i in range(n) ]
prev= s0
for i in range(17):
    now = [ prev[i] for i in prev ]
    prev= now
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
for i in range(n): print( ans[i],end=" " )

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

import sys

s= sys.stdin.readline().strip()
n= len(s)

s0= [0]*n
for i in range(n):
    if s[i]=="L": s0[i]= i-1
    if s[i]=="R": s0[i]= i+1
#
table=[1,100,104,105,106,107,111,113,114,115,117,123,125,127,131,136,137,142,145,148,149,151,153,155,157,159,162,163,164,165,166,169,171,172,176,181,185,186,187,191,198,201,202,203,206,207,209,211,215,216,217,220,221,222,223,224,225,227,233,234,235,238,239,242,246,247,250,255,256,257,258,261,264,265,267,272,273,275,277,278,279,282,283,284,285,286,288,289,294,295,298,300,303,304,306,309,312,314,315,317,319,320,323,326,329,332]

now= [ i for i in range(n) ]
prev= s0
for i in range(1,333):
    nxt = [None]*n
    for j in range(n): nxt[j]= prev[prev[j]]
    if i in table: now= [ nxt[now[j]] for j in range(n) ]
    prev= nxt
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
    
for i in range(n): 
    print( ans[i],end=" " )


Fixed submission:
import sys

s0=[]
for i,c in enumerate(sys.stdin.readline().strip()):
    if c=="L": s0.append(i-1)
    if c=="R": s0.append(i+1)
n= len(s0)
#
now= [ i for i in range(n) ]
prev= s0
for i in range(17):
    now = [ prev[i] for i in prev ]
    prev= now
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
for i in range(n): print( ans[i],end=" " )

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

import sys
from math import log

s= sys.stdin.readline().strip()
n= len(s)

s0= [0]*n
for i in range(n):
    if s[i]=="L": s0[i]= i-1
    if s[i]=="R": s0[i]= i+1
#
table=[1,100,104,105,106,107,111,113,114,115,117,123,125,127,131,136,137,142,145,148,149,151,153,155,157,159,162,163,164,165,166,169,171,172,176,181,185,186,187,191,198,201,202,203,206,207,209,211,215,216,217,220,221,222,223,224,225,227,233,234,235,238,239,242,246,247,250,255,256,257,258,261,264,265,267,272,273,275,277,278,279,282,283,284,285,286,288,289,294,295,298,300,303,304,306,309,312,314,315,317,319,320,323,326,329,332]

now= [ i for i in range(n) ]
prev= s0
for i in range(1,333):
    nxt = [ 0 for _ in range(n) ]
    for j in range(n): nxt[j]= prev[prev[j]]
    if i in table:
        tmp= now.copy()
        now= [ nxt[tmp[j]] for j in range(n) ]
    prev= nxt.copy()
#
for i in range(n):
    print( now.count(i),end=" " )


Fixed submission:
import sys

s0=[]
for i,c in enumerate(sys.stdin.readline().strip()):
    if c=="L": s0.append(i-1)
    if c=="R": s0.append(i+1)
n= len(s0)
#
now= [ i for i in range(n) ]
prev= s0
for i in range(17):
    now = [ prev[i] for i in prev ]
    prev= now
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
for i in range(n): print( ans[i],end=" " )

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python

import sys
from math import log

s= sys.stdin.readline().strip()
n= len(s)
steps= [ [0]*n for i in range(333) ]
ref= steps[0]
for i in range(n):
    if s[i]=="L": ref[i]= i-1
    if s[i]=="R": ref[i]= i+1
#
for i in range(1,333):
    sp = steps[i-1]
    sn = steps[i]
    for j in range(n): sn[j]= sp[sp[j]]
#
table = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, True, True, True, False, False, False, True, False, True, True, True, False, True, False, False, False, False, False, True, False, True, False, True, False, False, False, True, False, False, False, False, True, True, False, False, False, False, True, False, False, True, False, False, True, True, False, True, False, True, False, True, False, True, False, True, False, False, True, True, True, True, True, False, False, True, False, True, True, False, False, False, True, False, False, False, False, True, False, False, False, True, True, True, False, False, False, True, False, False, False, False, False, False, True, False, False, True, True, True, False, False, True, True, False, True, False, True, False, False, False, True, True, True, False, False, True, True, True, True, True, True, False, True, False, False, False, False, False, True, True, True, False, False, True, True, False, False, True, False, False, False, True, True, False, False, True, False, False, False, False, True, True, True, True, False, False, True, False, False, True, True, False, True, False, False, False, False, True, True, False, True, False, True, True, True, False, False, True, True, True, True, True, False, True, True, False, False, False, False, True, True, False, False, True, False, True, False, False, True, True, False, True, False, False, True, False, False, True, False, True, True, False, True, False, True, True, False, False, True, False, False, True, False, False, True, False, False, True]
#
now= [ i for i in range(n) ]
for i in range(333):
    if table[i]:
        tmp= now.copy()
        now= [ steps[i][tmp[j]] for j in range(n) ]
#
for i in range(n):
    print( now.count(i),end=" " )


Fixed submission:
import sys

s0=[]
for i,c in enumerate(sys.stdin.readline().strip()):
    if c=="L": s0.append(i-1)
    if c=="R": s0.append(i+1)
n= len(s0)
#
now= [ i for i in range(n) ]
prev= s0
for i in range(17):
    now = [ prev[i] for i in prev ]
    prev= now
#
ans= [0]*n
for i in range(n): ans[now[i]]+=1
for i in range(n): print( ans[i],end=" " )