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

count = [0] * len(S)

for i in range(0, len(S)):
  current = i
  
  if S[current] == "R":
    for j in range(0, pow(10, 100)):
      if S[current+1] == "L":
        if j % 2 == 1:
          current += 1
        break
      else:
        current += 1
  else:
    for j in range(0, pow(10, 100)):
      if S[current-1] == "R":
        if j % 2 == 1:
          current -= 1
        break
      else:
        current -= 1

  count[current] += 1
  
result = " ".join(map(str, count))

print(result)

Fixed submission:
S = list(str(input()))
result_position = [0] * len(S)
count = [0] * len(S)

# 最も左の計算
current = 0
for j in range(0, pow(10, 100)):
  if S[current + 1] == "L":
    if j % 2 == 1:
      current += 1
    break
  else:
    current += 1
result_position[0] = current
count[current] += 1

for i in range(1, len(S)):
  if (S[i - 1] == "R") or (S[i - 1] == "L" and S[i] == "L"):
    if S[result_position[i - 1]] == "R":
      result_position[i] = result_position[i - 1] + 1
    else:
      result_position[i] = result_position[i - 1] - 1
    count[result_position[i]] += 1
  else:
    current = i
    for j in range(0, pow(10, 100)):
      if S[current+1] == "L":
        if j % 2 == 1:
          current += 1
        break
      else:
        current += 1
    result_position[i] = current
    count[current] += 1
  
result = " ".join(map(str, count))

print(result)

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

count = [0] * len(S)

for i in range(0, len(S)):
  current = i
  for j in range(0, pow(10, 100)):
    if S[current] == "R" and S[current+1] == "R":
      current += 1
    elif S[current] == "R" and S[current+1] == "L":
      if j % 2 == 1:
        current += 1
      break
    elif S[current] == "L" and S[current-1] == "R":
      if j % 2 == 1:
        current -= 1
      break
    elif S[current] == "L" and S[current-1] == "L":
      current -= 1
  count[current] += 1
  
result = " ".join(map(str, count))

print(result)

Fixed submission:
S = list(str(input()))
result_position = [0] * len(S)
count = [0] * len(S)

# 最も左の計算
current = 0
for j in range(0, pow(10, 100)):
  if S[current + 1] == "L":
    if j % 2 == 1:
      current += 1
    break
  else:
    current += 1
result_position[0] = current
count[current] += 1

for i in range(1, len(S)):
  if (S[i - 1] == "R") or (S[i - 1] == "L" and S[i] == "L"):
    if S[result_position[i - 1]] == "R":
      result_position[i] = result_position[i - 1] + 1
    else:
      result_position[i] = result_position[i - 1] - 1
    count[result_position[i]] += 1
  else:
    current = i
    for j in range(0, pow(10, 100)):
      if S[current+1] == "L":
        if j % 2 == 1:
          current += 1
        break
      else:
        current += 1
    result_position[i] = current
    count[current] += 1
  
result = " ".join(map(str, count))

print(result)

Buggy python submission (verdict: Runtime Error):
S = list(str(input()))

count = [0] * len(S)

for i in range(0, len(S)):
  current = i
  for j in range(0, 10 **100)
	  if S[current] == "R" and S[current+1] == "R":
        current += 1
      if S[current] == "R" and S[current+1] == "L":
        if j % 2 == 1:
          current += 1
          break:
      if S[current] == "L" and S[current-1] == "R":
        if j % 2 == 1:
          current -= 1
          break:
      if S[current] == "L" and S[current+1] == "L":
        current -= 1
  count[current] += 1
  
print(count)

Fixed submission:
S = list(str(input()))
result_position = [0] * len(S)
count = [0] * len(S)

# 最も左の計算
current = 0
for j in range(0, pow(10, 100)):
  if S[current + 1] == "L":
    if j % 2 == 1:
      current += 1
    break
  else:
    current += 1
result_position[0] = current
count[current] += 1

for i in range(1, len(S)):
  if (S[i - 1] == "R") or (S[i - 1] == "L" and S[i] == "L"):
    if S[result_position[i - 1]] == "R":
      result_position[i] = result_position[i - 1] + 1
    else:
      result_position[i] = result_position[i - 1] - 1
    count[result_position[i]] += 1
  else:
    current = i
    for j in range(0, pow(10, 100)):
      if S[current+1] == "L":
        if j % 2 == 1:
          current += 1
        break
      else:
        current += 1
    result_position[i] = current
    count[current] += 1
  
result = " ".join(map(str, count))

print(result)