Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
prev = ''
for i in range(n):
  if t[i] is not None:
    continue
  if prev == 'R' and s[i] == 'L':
    j = i
    while t[j] == 'L' and j < n:
      t[j] = (j - (i - 1), i - 1)
      j += 1
    j = i - 1
    while t[j] == 'R' and j > 0:
      t[j] = (j - (i - 1), i - 1)
      j -= 1
  prev = s[i]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
prev = ''
for i in range(n):
  if t[i] is not None:
    continue
  if prev == 'R' and s[i] == 'L':
    j = i
    while t[j] == 'L' and j < n:
      t[j] = (j - (i - 1), i - 1)
      j += 1
    j = i - 1
    while t[j] == 'R' and j > 0:
      t[j] = (j - (i - 1), i - 1)
      j -= 1
  prev = s[i]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
prev = ''
for i in range(n):
  if t[i] is not None:
    continue
  if prev == 'R' and s[i] == 'L':
    j = i
    while t[j] == 'L' and j < n:
      t[j] = (j - (i - 1), i - 1)
      j += 1
    j = i - 1
    while t[j] == 'R' and j > 0:
      t[j] = (j - (i - 1), i - 1)
      j -= 1
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
prev = ''
for i in range(n):
  if t[i] is not None:
    continue
  if prev == 'R' and s[i] == 'L':
    j = i
    while t[j] == 'L' and j < n:
      t[j] = (j - (i - 1), i - 1)
      j = i + 1
    j = i - 1
    while t[j] == 'R' and j > 0:
      t[j] = (j - (i - 1), i - 1)
      j = i - 1
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
t = [None for _ in range(n)]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if t[p] is not None:
      fp = t[p][0]
      fcount = count + t[p][1]
      t[i] = (fp, fcount)
      if fcount % 2 == 0:
        result[fp] += 1
      else:
        result[fp - 1] += 1
      break
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        t[i] = (p, count)
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))

Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = len(s)
result = [0 for _ in range(n)]
for i in range(n):
  p = i
  if s[p] == 'R':
    p += 1
    prev = 'R'
  else:
    p -= 1
    prev = 'L'
  count = 1
  while True:
    if s[p] == 'R':
      p += 1
      prev = 'R'
    else:
      if prev == 'R':
        if count % 2 == 0:
          result[p] += 1
        else:
          result[p - 1] += 1
        break
      p -= 1
      prev = 'L'
    count += 1
print(' '.join(map(str, result)))


Fixed submission:
s = input()
n = len(s)
result = [0 for _ in range(n)]
start = 0
c = 'R'
for i in range(1, n):
  if s[i] != c:
    if c == 'R':
      result[i - 1] += (i - start) // 2 + (i - start) % 2
      result[i] += (i - start) // 2
      c = 'L'
    else:
      result[start] += (i - start) // 2 + (i - start) % 2
      result[start - 1] += (i - start) // 2
      c = 'R'
    start = i
result[start] += (n - start) // 2 + (n - start) % 2
result[start - 1] += (n - start) // 2
print(*result)