Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
 
s_split = []
tmp = []
idx_all = []
l = -1
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'R' and s[i + 1] == 'L':
        idx_all.append(i - l - 1)
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
        l = i
tmp.append(s[-1])
s_split.append(tmp)
 
out = ''
for a in range(len(s_split)):
    idx = idx_all[a]
    _split = s_split[a]
 
    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2
 
    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2
 
        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2
 
    out += ' 0' * idx
    out += ' ' + str(r_int)
    out += ' ' + str(l_int)
    out += ' 0' * (len(_split) - idx - 2)
 
print(out[1:])

Fixed submission:
s = list(input())

s_split = []
tmp = []
idx_all = []
l = -1
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'R' and s[i + 1] == 'L':
        idx_all.append(i - l - 1)
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
        l = i
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for a in range(len(s_split)):
    idx = idx_all[a]
    _split = s_split[a]

    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2

    out += ' 0' * idx
    out += ' ' + str(r_int)
    out += ' ' + str(l_int)
    out += ' 0' * (len(_split) - idx - 2)

print(out[1:])

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())

s_split = []
tmp = []
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for _split in s_split:
    for i in range(len(_split) - 1):
        if _split[i] == 'R' and _split[i + 1] == 'L':
            idx = i

    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2

    for i in range(len(_split)):
        if i < idx:
            out += ' 0'
        elif i == idx:
            out += ' ' + str(r_int)
        elif i == idx + 1:
            out += ' ' + str(l_int)
        else:
            out += ' 0'


print(out[1:])


Fixed submission:
s = list(input())

s_split = []
tmp = []
idx_all = []
l = -1
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'R' and s[i + 1] == 'L':
        idx_all.append(i - l - 1)
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
        l = i
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for a in range(len(s_split)):
    idx = idx_all[a]
    _split = s_split[a]

    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2

    out += ' 0' * idx
    out += ' ' + str(r_int)
    out += ' ' + str(l_int)
    out += ' 0' * (len(_split) - idx - 2)

print(out[1:])

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())

s_split = []
tmp = []
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for _split in s_split:
    for i in range(len(_split) - 1):
        if _split[i] == 'R' and _split[i + 1] == 'L':
            idx = i

    tmp = [0] * len(_split)
    if len(_split) % 2 == 0:
        tmp[idx] = len(_split) // 2
        tmp[idx + 1] = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2
        tmp[idx] = r_int
        tmp[idx + 1] = l_int

    for i in range(len(_split)):
        out += ' ' + str(tmp[i])

print(out[1:])


Fixed submission:
s = list(input())

s_split = []
tmp = []
idx_all = []
l = -1
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'R' and s[i + 1] == 'L':
        idx_all.append(i - l - 1)
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
        l = i
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for a in range(len(s_split)):
    idx = idx_all[a]
    _split = s_split[a]

    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2

    out += ' 0' * idx
    out += ' ' + str(r_int)
    out += ' ' + str(l_int)
    out += ' 0' * (len(_split) - idx - 2)

print(out[1:])

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())

s_split = []
tmp = []
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for _split in s_split:
    for i in range(len(_split) - 1):
        if _split[i] == 'R' and _split[i + 1] == 'L':
            idx = i

    tmp = [0] * len(_split)
    if len(_split) % 2 == 0:
        for i in range(len(_split)):
            tmp[idx] = len(_split) // 2
            tmp[idx + 1] = len(_split) // 2

    else:
        r_int = 0
        l_int = 0
        for i in range(len(_split)):
            dist = abs(idx - i)
            if dist % 2 == 0:
                r_int += 1
            else:
                l_int += 1
        tmp[idx] = r_int
        tmp[idx + 1] = l_int

    for i in range(len(_split)):
        out += ' ' + str(tmp[i])

print(out[1:])


Fixed submission:
s = list(input())

s_split = []
tmp = []
idx_all = []
l = -1
for i in range(len(s) - 1):
    tmp.append(s[i])
    if s[i] == 'R' and s[i + 1] == 'L':
        idx_all.append(i - l - 1)
    if s[i] == 'L' and s[i + 1] == 'R':
        s_split.append(tmp)
        tmp = []
        l = i
tmp.append(s[-1])
s_split.append(tmp)

out = ''
for a in range(len(s_split)):
    idx = idx_all[a]
    _split = s_split[a]

    if len(_split) % 2 == 0:
        r_int = len(_split) // 2
        l_int = len(_split) // 2

    else:
        if idx % 2 == 1:
            r_int = (len(_split) - 1) // 2
            l_int = (len(_split) + 1) // 2

        else:
            l_int = (len(_split) - 1) // 2
            r_int = (len(_split) + 1) // 2

    out += ' 0' * idx
    out += ' ' + str(r_int)
    out += ' ' + str(l_int)
    out += ' 0' * (len(_split) - idx - 2)

print(out[1:])