Buggy python submission (verdict: Time Limit Exceeded):
S = input()
ls = len(S)
box = [1]*ls

Sc = S
Sc = Sc.replace("RL", "X")

counter = 0
mval = 0


for i in Sc:
    if i != "X":
        counter += 1
        mval = max(counter, mval)
    else:
        counter = 0

if mval % 2 == 0:
    pass
else:
    mval += 1


for i in range(mval):
    boxc = box.copy()
    for j, k in enumerate(S):
        if box[j] == 0:
            continue

        if k == "R":
            box[j+1] += boxc[j]
            box[j] -= boxc[j]
        else:
            box[j-1] += boxc[j]
            box[j] -= boxc[j]

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

Fixed submission:
S = list(str(input()))
ls = len(S)
a = [1]*ls
for i in range(ls-2):
    if S[i] == S[i+1] == "R":
        a[i+2] += a[i]
        a[i] = 0
for i in range(ls)[::-1]:
    if S[i] == S[i-1] == "L":
        a[i-2] += a[i]
        a[i] = 0
print(" ".join(map(str, a)))

Buggy python submission (verdict: Runtime Error):
S = input()
ls = len(S)
box = [1]*ls

Sc = S
Sc = Sc.replace("RL", "X")

counter = 0
mval = 0


for i in Sc:
    if i != "X":
        counter += 1
        mval = max(counter, mval)
    else:
        counter = 0

if mval % 2 == 0:
    pass
else:
    mval += 1


for i in range(mval):
    boxc = box.copy()
    for j, k in enumerate(S):
        if box[j] == 0:
            continue

        if k == "R":
            box[j+1] += boxc[j]
            box[j] -= boxc[j]
        else:
            box[j-1] += boxc[j]
            box[j] -= boxc[j]

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

Fixed submission:
S = list(str(input()))
ls = len(S)
a = [1]*ls
for i in range(ls-2):
    if S[i] == S[i+1] == "R":
        a[i+2] += a[i]
        a[i] = 0
for i in range(ls)[::-1]:
    if S[i] == S[i-1] == "L":
        a[i-2] += a[i]
        a[i] = 0
print(" ".join(map(str, a)))

Buggy python submission (verdict: Runtime Error):
S = input()
ls = len(S)
box = [1]*ls

Sc = S
Sc = Sc.replace("RL", "X")

counter = 0
mval = 0


for i in Sc:
    if i != "X":
        counter += 1
        mval = max(counter, mval)
    else:
        counter = 0

if mval % 2 == 0:
    pass
else:
    mval += 1


for i in range(mval):
    boxc = box.copy()
    for j, k in enumerate(S):
        if box[j] == 0:
            continue

        if k == "R":
            box[j+1] += boxc[j]
            box[j] -= boxc[j]
        else:
            box[j-1] += boxc[j]
            box[j] -= boxc[j]

print(*box)

Fixed submission:
S = list(str(input()))
ls = len(S)
a = [1]*ls
for i in range(ls-2):
    if S[i] == S[i+1] == "R":
        a[i+2] += a[i]
        a[i] = 0
for i in range(ls)[::-1]:
    if S[i] == S[i-1] == "L":
        a[i-2] += a[i]
        a[i] = 0
print(" ".join(map(str, a)))

Buggy python submission (verdict: Runtime Error):
S = input()
ls = len(S)
box = [1]*ls

Sc = S
Sc = Sc.replace("RL", "X")

counter = 0
mval = 0

print(Sc)

for i in Sc:
    if i != "X":
        counter += 1
        mval = max(counter, mval)
    else:
        counter = 0

if mval % 2 == 0:
    pass
else:
    mval += 1


for i in range(mval):
    boxc = box.copy()
    for j, k in enumerate(S):
        if box[j] == 0:
            continue

        if k == "R":
            box[j+1] += boxc[j]
            box[j] -= boxc[j]
        else:
            box[j-1] += boxc[j]
            box[j] -= boxc[j]

print(*box)

Fixed submission:
S = list(str(input()))
ls = len(S)
a = [1]*ls
for i in range(ls-2):
    if S[i] == S[i+1] == "R":
        a[i+2] += a[i]
        a[i] = 0
for i in range(ls)[::-1]:
    if S[i] == S[i-1] == "L":
        a[i-2] += a[i]
        a[i] = 0
print(" ".join(map(str, a)))