Buggy python submission (verdict: Time Limit Exceeded):
s=input()
endlist=[]
list=[]
a=len(s)
for i in range(a):
  endlist.append(0)
for j in range(a):
  if s[j]=='R':
    list.append(1)
  else:
    list.append(-1)
b=0
if a%2==0:
  for k in range(a):
    b=k
    for l in range(a):
      b += list[b]
    endlist[b] += 1
else:
  for k in range(a):
    b=k
    for l in range(a-1):
      b += list[b]
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
def roopR(l,n):
  if list[k]==1:
    for p in range(a):
      if list[l]==-1 and n%2==0:
        return l
      elif list[l]==-1 and n%2==1:
        return l-1
      else:
        l += 1
        n += 1
  else:
    for q in range(a):
      if list[l]==1 and n%2==0:
        return l
      elif list[l]==1 and n%2==1:
        return l+1
      else:
        l -= 1
        n += 1

a=len(s)
endlist=[]
list=[]
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
for j in range(a):
  endlist.append(0)
for k in range(a):
  b=roopR(k,0)
  endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
def roopR(l,n):
  if list[k]==1:
    for p in range(a):
      if list[l]==-1:
        if n%2==0:
          return l
        else:
          return l-1
      else:
        l += 1
        n += 1
  else:
    for q in range(a):
      if list[l]==1:
        if n%2==0:
          return l
        else:
          return l+1
      else:
        l -= 1
        n += 1

a=len(s)
endlist=[]
list=[]
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
for j in range(a):
  endlist.append(0)
for k in range(a):
  b=roopR(k,0)
  endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Runtime Error):
s=input()
def roopR(l,n):
  if list[k]==1:
    for p in range(a):
      if list[l]==-1:
        if n%2==0:
          return l
        else:
          return l-1
      else:
        l += 1
        n += 1
  else:
    for q in range(a):
      if list[m]==1:
        if o%2==0:
          return m
        else:
          return m+1
      else:
        m -= 1
        o += 1

a=len(s)
endlist=[]
list=[]
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
for j in range(a):
  endlist.append(0)
for k in range(a):
  b=roopR(k,0)
  endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
def roopR(l,n):
  for p in range(a):
    if list[l]==-1:
      if n%2==0:
        return l
      else:
        return l-1
    else:
      l += 1
      n += 1

def roopL(m,o):
  for q in range(a):
    if list[m]==1:
      if o%2==0:
        return m
      else:
        return m+1
    else:
      m -= 1
      o += 1

a=len(s)
endlist=[]
list=[]
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
for j in range(a):
  endlist.append(0)
for k in range(a):
  if list[k]==1:
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(1000000)

s=input()
def roopR(l,n):
  if s[l]=='L':
    if n%2==0:
      return l
    else:
      return l-1
  else:
    return roopR(l+1,n+1)

def roopL(l,n):
  if s[l]=='R':
    if n%2==0:
      return l
    else:
      return l+1
  else:
    return roopL(l-1,n+1)

a=len(s)
endlist=[]
for j in range(a):
  endlist.append(0)
for k in range(a):
  if s[k]=='R':
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Runtime Error):
s=input()
def roopR(l,n):
  if s[l]=='L':
    if n%2==0:
      return l
    else:
      return l-1
  else:
    return roopR(l+1,n+1)

def roopL(l,n):
  if s[l]=='R':
    if n%2==0:
      return l
    else:
      return l+1
  else:
    return roopL(l-1,n+1)

a=len(s)
endlist=[]
for j in range(a):
  endlist.append(0)
for k in range(a):
  if s[k]=='R':
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Runtime Error):
s=input()
list=[]
def roopR(l,n):
  if list[l]==-1:
    if n%2==0:
      return l
    else:
      return l-1
  else:
    return roopR(l+1,n+1)
  
def roopL(l,n):
  if list[l]==1:
    if n%2==0:
      return l
    else:
      return l+1
  else:
    return roopL(l-1,n+1)

a=len(s)
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
s.clear()
endlist=[]
for j in range(a):
  endlist.append(0)
for k in range(a):
  if list[k]==1:
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Runtime Error):
s=input()
list=[]
def roopR(l,n):
  if list[l]==-1:
    if n%2==0:
      return l
    else:
      return l-1
  else:
    return roopR(l+1,n+1)
  
def roopL(l,n):
  if list[l]==1:
    if n%2==0:
      return l
    else:
      return l+1
  else:
    return roopL(l-1,n+1)

a=len(s)
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
endlist=[]
for j in range(a):
  endlist.append(0)
for k in range(a):
  if list[k]==1:
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(*endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)

Buggy python submission (verdict: Runtime Error):
s=input()
list=[]
def roopR(l,n):
  if list[l]==-1:
    if n%2==0:
      return l
    else:
      return l-1
  else:
    return roopR(l+1,n+1)
  
def roopL(l,n):
  if list[l]==1:
    if n%2==0:
      return l
    else:
      return l+1
  else:
    return roopL(l-1,n+1)

a=len(s)
for i in range(a):
  if s[i]=='R':
    list.append(1)
  else:
    list.append(-1)
endlist=[]
for j in range(a):
  endlist.append(0)
for k in range(a):
  if list[k]==1:
    b=roopR(k,0)
    endlist[b] += 1
  else:
    b=roopL(k,0)
    endlist[b] += 1
print(endlist)

Fixed submission:
S=input()
dp=[0]*len(S)
a=0
for i in range(len(S)):
  if S[i]=='R':
    a+=1
  else:
    dp[i]+=a//2
    dp[i-1]+=a-a//2
    a=0
for i in range(len(S)-1,-1,-1):
  if S[i]=='L':
    a+=1
  else:
    dp[i]+=a//2
    dp[i+1]+=a-a//2
    a=0
print(*dp)