Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	D
# CreatedDate:  2020-08-18 14:44:25 +0900
# LastModified: 2020-09-11 15:30:45 +0900
#


import os
import sys


def pivot_index(change_box, i, which):
    if which == 0:
        for cb in change_box:
            if cb >= i:
                return cb
    else:
        for j in range(len(change_box)-1, -1, -1):
            if change_box[j] <= i:
                return change_box[j]


def main():
    S = input()
    change_box = []
    floor_chart = 1
    i = 0
    while i < len(S)-1:
        if S[i] != S[i+1] and floor_chart == 1:
            floor_chart = 0
            change_box.append(i)
        elif S[i] != S[i+1] and floor_chart == 0:
            floor_chart = 1
        i += 1

    ans = [0]*len(S)
    omit = 0
    for i in range(len(S)):
        if S[i] == 'R':
            if omit == 0:
                pidx = pivot_index(change_box, i, 0)
                omit = 1
            cool = pidx - i
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx+1] += 1

        else:
            if omit == 1:
                pidx = pivot_index(change_box, i, 1)+1
                omit = 0
            cool = i - pidx
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx-1] += 1
    print(ans[0], end='')
    for i in range(1, len(ans)):
        print(" {}".format(ans[i]), end='')
    print()


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	D
# CreatedDate:  2020-08-18 14:44:25 +0900
# LastModified: 2020-09-11 15:35:56 +0900
#


import os
import sys


def pivot_index(change_box, i, which):
    if which == 0:
        for cb in change_box:
            if cb >= i:
                return cb
    else:
        for j in range(len(change_box)-1, -1, -1):
            if change_box[j] <= i:
                return change_box[j]


def main():
    S = input()
    change_box = []
    floor_chart = 1
    i = 0
    while i < len(S)-1:
        if S[i] != S[i+1] and floor_chart == 1:
            floor_chart = 0
            change_box.append(i)
        elif S[i] != S[i+1] and floor_chart == 0:
            floor_chart = 1
        i += 1

    ans = [0]*len(S)
    one_cool = 0
    hash_one = 0
    for i in range(len(S)):
        if S[i] == 'R':
            if hash_one == 1:
                hash_one = 0
                one_cool += 1
            pidx = change_box[one_cool]
            cool = pidx - i
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx+1] += 1

        else:
            pidx = change_box[one_cool]+1
            hash_one = 1
            cool = i - pidx
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx-1] += 1
    print(ans[0], end='')
    for i in range(1, len(ans)):
        print(" {}".format(ans[i]), end='')
    print()


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	D
# CreatedDate:  2020-08-18 14:44:25 +0900
# LastModified: 2020-09-11 15:23:10 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def pivot_index(change_box, i, which):
    if which == 0:
        for cb in change_box:
            if cb >= i:
                return cb
    else:
        for j in range(len(change_box)-1, -1, -1):
            if change_box[j] <= i:
                return change_box[j]


def main():
    S = input()
    change_box = []
    floor_chart = 1
    i = 0
    while i < len(S)-1:
        if S[i] != S[i+1] and floor_chart == 1:
            floor_chart = 0
            change_box.append(i)
        elif S[i] != S[i+1] and floor_chart == 0:
            floor_chart = 1
        i += 1

#    print(change_box)
    ans = [0]*len(S)
    for i in range(len(S)):
        if S[i] == 'R':
            pidx = pivot_index(change_box, i, 0)
            cool = pidx - i
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx+1] += 1

        else:
            pidx = pivot_index(change_box, i, 1)+1
            cool = i - pidx
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx-1] += 1
    print(ans[0], end='')
    for i in range(1, len(ans)):
        print(" {}".format(ans[i]), end='')
    print()


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	D
# CreatedDate:  2020-08-18 14:44:25 +0900
# LastModified: 2020-09-11 15:35:56 +0900
#


import os
import sys


def pivot_index(change_box, i, which):
    if which == 0:
        for cb in change_box:
            if cb >= i:
                return cb
    else:
        for j in range(len(change_box)-1, -1, -1):
            if change_box[j] <= i:
                return change_box[j]


def main():
    S = input()
    change_box = []
    floor_chart = 1
    i = 0
    while i < len(S)-1:
        if S[i] != S[i+1] and floor_chart == 1:
            floor_chart = 0
            change_box.append(i)
        elif S[i] != S[i+1] and floor_chart == 0:
            floor_chart = 1
        i += 1

    ans = [0]*len(S)
    one_cool = 0
    hash_one = 0
    for i in range(len(S)):
        if S[i] == 'R':
            if hash_one == 1:
                hash_one = 0
                one_cool += 1
            pidx = change_box[one_cool]
            cool = pidx - i
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx+1] += 1

        else:
            pidx = change_box[one_cool]+1
            hash_one = 1
            cool = i - pidx
            if cool % 2 == 0:
                ans[pidx] += 1
            else:
                ans[pidx-1] += 1
    print(ans[0], end='')
    for i in range(1, len(ans)):
        print(" {}".format(ans[i]), end='')
    print()


if __name__ == "__main__":
    main()