Buggy python submission (verdict: Time Limit Exceeded):
s = str(input())
l = len(s)
#lr = [1 if s[i] == 'R' and s[i+1] == 'L' else 0 for i in range(l-1)]
#print(lr)
ans = [0 for _ in range(l)]
for i in range(l):
    if s[i] == 'R':
        tmp = -1
        for j in range(i, l-1):
            if s[j] == 'R' and s[j+1] == 'L':
                tmp = j
                break
        if tmp == -1:
            ans[l-1] += 1
            continue
        if (tmp - i) % 2 == 0:
            ans[tmp] += 1
        else:
            ans[tmp+1] += 1
    elif s[i] == 'L':
        tmp = -1
        for j in reversed(range(0, i)):
            if s[j] == 'R' and s[j+1] == 'L':
                tmp = j
                break
        if tmp == -1:
            ans[0] += 1
            continue
        if (i - tmp) % 2 == 0:
            ans[tmp] += 1
        else:
            ans[tmp+1] += 1
    #print(ans)

for i in range(l-1):
    print(ans[i],end=' ')
print(ans[l-1])

Fixed submission:
#https://atcoder.jp/contests/abc136/tasks/abc136_d

s = list(str(input()))
n = len(s)
t = []
u = []
v = [0] * n
for i in range(n):
    if i == 0:
        for j in range(i, n):
            if s[j] == 'L':
                t.append(j - 1)
                u.append(j - i - 1)
                break

    else:
        if s[i] == s[i-1]:
            t.append(t[i-1])
            u.append(u[i-1] + 1)
        elif s[i] == 'R':
            for j in range(i, n):
                if s[j] == 'L':
                    t.append(j - 1)
                    u.append(j - i - 1)
                    break
        else:
            
            for j in reversed(range(i)):
                if s[j] == 'R':
                    t.append(j)
                    u.append(i - j)
                    break
            '''
            t.append(i-1)
            u.append(0)
            '''
    a = u[i] % 2
    v[t[i] + a] += 1


print(' '.join(map(str, v)))

Buggy python submission (verdict: Time Limit Exceeded):
#https://atcoder.jp/contests/abc136/tasks/abc136_d

s = list(str(input()))
n = len(s)
t = []
u = []
w = []
for i in range(n):
    if s[i] == 'R':
        for j in range(i, n):
            if s[j] == 'L':
                t.append(j - 1)
                u.append(j - i - 1)
                break
    else:
        for j in reversed(range(i)):
            if s[j] == 'R':
                t.append(j)
                u.append(i - j)
                break

v = [0] * n
aaa = 10 ** 100

for i in range(n):
    a = (aaa - u[i]) % 2
    v[t[i] + a] += 1

print(' '.join(map(str, v)))


Fixed submission:
#https://atcoder.jp/contests/abc136/tasks/abc136_d

s = list(str(input()))
n = len(s)
t = []
u = []
v = [0] * n
for i in range(n):
    if i == 0:
        for j in range(i, n):
            if s[j] == 'L':
                t.append(j - 1)
                u.append(j - i - 1)
                break

    else:
        if s[i] == s[i-1]:
            t.append(t[i-1])
            u.append(u[i-1] + 1)
        elif s[i] == 'R':
            for j in range(i, n):
                if s[j] == 'L':
                    t.append(j - 1)
                    u.append(j - i - 1)
                    break
        else:
            
            for j in reversed(range(i)):
                if s[j] == 'R':
                    t.append(j)
                    u.append(i - j)
                    break
            '''
            t.append(i-1)
            u.append(0)
            '''
    a = u[i] % 2
    v[t[i] + a] += 1


print(' '.join(map(str, v)))