output_description: Print the number of children standing on each square after the children
  performed the moves, in order from left to right.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: S = input()  # 文字列を変数に格納
  
  N = len(S)
  now = "R"
  A_R = 0
  B_R = 0
  A_L = 0
  B_L = 0
  List = []
  
  for i in range(N - 1):
      if now == "R" and S[i + 1] == "R":
          if A_R <= B_R:
              A_R += 1
          else:
              B_R += 1
  
      elif now == "L" and S[i + 1] == "L":
          if A_L <= B_L:
              A_L += 1
          else:
              B_L += 1
  
      elif now == "R" and S[i + 1] == "L":
          now = "L"
          if i == (N - 2):
              for j in range(A_R + B_R):
                  List.append(0)
              if A_R > B_R and A_L > B_L:
                  List.append(B_R + A_L + 1)
                  List.append(A_R + B_L + 1)
              elif A_R > B_R and A_L == B_L:
                  List.append(B_R + A_L + 1)
                  List.append(A_R + B_L + 1)
              elif A_R == B_R and A_L > B_L:
                  List.append(A_R + A_L + 1)
                  List.append(B_R + B_L + 1)
              else:
                  List.append(A_R + A_L + 1)
                  List.append(B_R + B_L + 1)
  
      elif now == "L" and (S[i + 1] == "R" or i == (N - 2)):
          for j in range(A_R + B_R):
              List.append(0)
          if A_R > B_R and A_L > B_L:
              List.append(B_R + A_L + 1)
              List.append(A_R + B_L + 1)
          elif A_R > B_R and A_L == B_L:
              List.append(B_R + A_L + 1)
              List.append(A_R + B_L + 1)
          elif A_R == B_R and A_L > B_L:
              List.append(A_R + A_L + 1)
              List.append(B_R + B_L + 1)
          else:
              List.append(A_R + A_L + 1)
              List.append(B_R + B_L + 1)
  
          for k in range(A_L + B_L):
              List.append(0)
          A_R = 0
          B_R = 0
          A_L = 0
          B_L = 0
          now = "R"
  
  print(List)
  
problem_description: Statement
  
  Given is a string S consisting of `L` and `R`.
  
  Let N be the length of S. There are N squares arranged from left to right, and
  the i-th character of S from the left is written on the i-th square from the
  left.
  
  The character written on the leftmost square is always `R`, and the character
  written on the rightmost square is always `L`.
  
  Initially, one child is standing on each square.
  
  Each child will perform the move below 10^{100} times:
  
    * Move one square in the direction specified by the character written in the square on which the child is standing. `L` denotes left, and `R` denotes right.
  
  Find the number of children standing on each square after the children
  performed the moves.
samples: [{"input": "RRLRL", "output": "0 1 2 1 1\n    \n\n  * After each child performed one move, the number of children standing on each square is 0, 2, 1, 1, 1 from left to right.\n  * After each child performed two moves, the number of children standing on each square is 0, 1, 2, 1, 1 from left to right.\n  * After each child performed 10^{100} moves, the number of children standing on each square is 0, 1, 2, 1, 1 from left to right.\n\n* * *"}, {"input": "RRLLLLRLRRLL", "output": "0 3 3 0 0 0 1 1 0 2 2 0\n    \n\n* * *"}, {"input": "RRRLLRLLRRRLLLLL", "output": "0 0 3 2 0 2 1 0 0 0 4 4 0 0 0 0"}]