Buggy python submission (verdict: Runtime Error):
import numpy as np
s = input()
# s = "RRLLLLRLRRLL"*10000

n = len(s)

pop = [0]*n

for i in range(n):
    if s[i] == "L":
        # iより左でもっとも右のRをみつける
        for dx in range(1, n-1):
            if s[i-dx] == "R":
                break
        idx = i-dx
        
        if (idx - i)%2 == 1:
            pop[idx+1] += 1
        else:
            pop[idx] += 1
    else:
        # iより右でもっとも左のLをみつける
        for dx in range(1, n-1):
            if s[i+dx] == "L":
                break
        idx = i+dx
        if (idx - i)%2 == 1:
            pop[idx-1] += 1
        else:
            pop[idx] += 1
print(" ".join(map(str, pop)))   

Fixed submission:
import numpy as np
s = input()
n = len(s)

pop = [0]*n

lastR = 0
for i in range(n):
    if s[i] == "L":
        if (lastR - i)%2 == 1:
            pop[lastR+1] += 1
        else:
            pop[lastR] += 1
    else:
        lastR = i
            
lastL = n
for i in range(n-1, -1, -1):  
    if s[i] == "R":
        if (lastL - i)%2 == 1:
            pop[lastL-1] += 1
        else:
            pop[lastL] += 1
    else:
        lastL = i
        
print(" ".join(map(str, pop)))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s = input()
# s = "RRLLLLRLRRLL"

n = len(s)

pop = [0]*n
for i in range(n):
    if s[i] == "L":
        # iより左でもっとも右のRをみつける
        idx = i-1 - s[:i][::-1].index('R')
#         print(idx)
#         print("amari", (idx - i)%2)
        if (idx - i)%2 == 1:
            pop[idx+1] += 1
        else:
            pop[idx] += 1
    else:
        # iより右でもっとも左のLをみつける
        idx = i+1 + s[i+1:].index('L')
#         print(idx)
#         print((idx - i)%2)
        if (idx - i)%2 == 1:
            pop[idx-1] += 1
        else:
            pop[idx] += 1
print(" ".join(map(str, pop)))   

Fixed submission:
import numpy as np
s = input()
n = len(s)

pop = [0]*n

lastR = 0
for i in range(n):
    if s[i] == "L":
        if (lastR - i)%2 == 1:
            pop[lastR+1] += 1
        else:
            pop[lastR] += 1
    else:
        lastR = i
            
lastL = n
for i in range(n-1, -1, -1):  
    if s[i] == "R":
        if (lastL - i)%2 == 1:
            pop[lastL-1] += 1
        else:
            pop[lastL] += 1
    else:
        lastL = i
        
print(" ".join(map(str, pop)))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s = input()
# s = "R"+"RL"*10000+"L"
step = np.max(list(map(len, s.split("RL"))))

n = len(s)
pop = [1]*n

if step%2 == 1:
    step = step+1
else:
    step = step

for t in range(step):
    new_pop = [0]*n
    for i in range(n):
        if s[i] == "R":
            new_pop[i+1] += pop[i]
        else:
            new_pop[i-1] += pop[i]
    pop = new_pop
print(" ".join(map(str, pop)))

Fixed submission:
import numpy as np
s = input()
n = len(s)

pop = [0]*n

lastR = 0
for i in range(n):
    if s[i] == "L":
        if (lastR - i)%2 == 1:
            pop[lastR+1] += 1
        else:
            pop[lastR] += 1
    else:
        lastR = i
            
lastL = n
for i in range(n-1, -1, -1):  
    if s[i] == "R":
        if (lastL - i)%2 == 1:
            pop[lastL-1] += 1
        else:
            pop[lastL] += 1
    else:
        lastL = i
        
print(" ".join(map(str, pop)))

Buggy python submission (verdict: Runtime Error):
s = input()
# s = "R"+"RL"*10000+"L"
step = np.max(list(map(len, s.split("RL"))))

n = len(s)
pop = [1]*n

if step%2 == 1:
    step = step+1
else:
    step = step

for t in range(step):
    new_pop = [0]*n
    for i in range(n):
        if s[i] == "R":
            new_pop[i+1] += pop[i]
        else:
            new_pop[i-1] += pop[i]
    pop = new_pop
print(" ".join(map(str, pop)))

Fixed submission:
import numpy as np
s = input()
n = len(s)

pop = [0]*n

lastR = 0
for i in range(n):
    if s[i] == "L":
        if (lastR - i)%2 == 1:
            pop[lastR+1] += 1
        else:
            pop[lastR] += 1
    else:
        lastR = i
            
lastL = n
for i in range(n-1, -1, -1):  
    if s[i] == "R":
        if (lastL - i)%2 == 1:
            pop[lastL-1] += 1
        else:
            pop[lastL] += 1
    else:
        lastL = i
        
print(" ".join(map(str, pop)))

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
pop = [1]*n

if n%2 == 1:
    step = n+1
else:
    step = n
    

for t in range(step):
    new_pop = [0]*n
    for i in range(n):
        if s[i] == "R":
            new_pop[i+1] += pop[i]
        else:
            new_pop[i-1] += pop[i]
    pop = new_pop
print(" ".join(map(str, pop)))

Fixed submission:
import numpy as np
s = input()
n = len(s)

pop = [0]*n

lastR = 0
for i in range(n):
    if s[i] == "L":
        if (lastR - i)%2 == 1:
            pop[lastR+1] += 1
        else:
            pop[lastR] += 1
    else:
        lastR = i
            
lastL = n
for i in range(n-1, -1, -1):  
    if s[i] == "R":
        if (lastL - i)%2 == 1:
            pop[lastL-1] += 1
        else:
            pop[lastL] += 1
    else:
        lastL = i
        
print(" ".join(map(str, pop)))