Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Rindex = [i for i,x in enumerate(S) if x == 'R']
Rindex = Rindex[::-1]
Lindex = [i for i,x in enumerate(S) if x == 'L']
res = [0 for i in range(len(S))]
for i in range(len(S)):
    if S[i] == 'R':
        for l in Lindex:
            if l>i:
                a = l
                break
                
        c = a - i - 1
        if c%2 == 0:
            res[a - 1] += 1
        else:
            res[a] += 1
    else:
        for r in Rindex:
            if r<i:
                a = r
                break
        c = i - a - 1
        if c%2 == 0:
            res[a + 1] += 1
        else:
            res[a] += 1
for i,r in enumerate(res):
    if i != len(res) -1:
        print(r, end=" ")
    else:
        print(r)

Fixed submission:
S = input()
Rnum = S.split('L')
Rnum = [len(i) for i in Rnum if i != '']
Lnum = S.split('R')
Lnum = [len(i) for i in Lnum if i != '']
res = [0]*len(S)
count = 0
for i,r in enumerate(Rnum):
    l = Lnum[i]
    res[r+count-1] = int((r+1)/2) + int(l/2)
    res[r+count] = int(r/2) + int((l+1)/2)
    count += r+l
for i,r in enumerate(res):
    if i!= len(res)-1:
        print(r,end=' ')
    else:
        print(r)

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Rindex = [i for i,x in enumerate(S) if x == 'R']
Lindex = [i for i,x in enumerate(S) if x == 'L']
res = [0 for i in range(len(S))]
for i in range(len(S)):
    if S[i] == 'R':
        for l in Lindex:
            if l>i:
                a = l
                break
                
        c = a - i - 1
        if c%2 == 0:
            res[a - 1] += 1
        else:
            res[a] += 1
    else:
        for r in Rindex[::-1]:
            if r<i:
                a = r
                break
        c = i - a - 1
        if c%2 == 0:
            res[a + 1] += 1
        else:
            res[a] += 1
for i,r in enumerate(res):
    if i != len(res) -1:
        print(r, end=" ")
    else:
        print(r)

Fixed submission:
S = input()
Rnum = S.split('L')
Rnum = [len(i) for i in Rnum if i != '']
Lnum = S.split('R')
Lnum = [len(i) for i in Lnum if i != '']
res = [0]*len(S)
count = 0
for i,r in enumerate(Rnum):
    l = Lnum[i]
    res[r+count-1] = int((r+1)/2) + int(l/2)
    res[r+count] = int(r/2) + int((l+1)/2)
    count += r+l
for i,r in enumerate(res):
    if i!= len(res)-1:
        print(r,end=' ')
    else:
        print(r)

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Rindex = [i for i,x in enumerate(S) if x == 'R']
Lindex = [i for i,x in enumerate(S) if x == 'L']
res = [0 for i in range(len(S))]
for i in range(len(S)):
    if S[i] == 'R':
        a = [x for x in Lindex if x>i]
        c = a[0] - i - 1
        if c%2 == 0:
            res[a[0] - 1] += 1
        else:
            res[a[0]] += 1
    else:
        a = [x for x in Rindex if x<i]
        c = i - a[-1] - 1
        if c%2 == 0:
            res[a[-1] + 1] += 1
        else:
            res[a[-1]] += 1
for i,r in enumerate(res):
    if i != len(res) -1:
        print(r, end=" ")
    else:
        print(r)

Fixed submission:
S = input()
Rnum = S.split('L')
Rnum = [len(i) for i in Rnum if i != '']
Lnum = S.split('R')
Lnum = [len(i) for i in Lnum if i != '']
res = [0]*len(S)
count = 0
for i,r in enumerate(Rnum):
    l = Lnum[i]
    res[r+count-1] = int((r+1)/2) + int(l/2)
    res[r+count] = int(r/2) + int((l+1)/2)
    count += r+l
for i,r in enumerate(res):
    if i!= len(res)-1:
        print(r,end=' ')
    else:
        print(r)

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
res = [0 for i in range(len(S))]

for i in range(len(S)):
    a = i
    b = S[i]
    while(True):
        if b == 'R':
            a += 1
            if S[a] != b:
                c = a - i - 1#直前までの移動回数
                rev = a#反対になったマス
                a -= 1 #直前のマス
                break
        else:
            a -= 1
            if S[a] != b:
                c = i - a - 1
                rev = a
                a += 1
                break
    if c%2 == 0:
        res[a] += 1
    else:
        res[rev] += 1
for i,r in enumerate(res):
    if i != len(res) -1 :
        print(r, end = " ")
    else:
        print(r)

Fixed submission:
S = input()
Rnum = S.split('L')
Rnum = [len(i) for i in Rnum if i != '']
Lnum = S.split('R')
Lnum = [len(i) for i in Lnum if i != '']
res = [0]*len(S)
count = 0
for i,r in enumerate(Rnum):
    l = Lnum[i]
    res[r+count-1] = int((r+1)/2) + int(l/2)
    res[r+count] = int(r/2) + int((l+1)/2)
    count += r+l
for i,r in enumerate(res):
    if i!= len(res)-1:
        print(r,end=' ')
    else:
        print(r)