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: # 2019-11-16 10:55:08(JST)
  import sys
  
  # import collections
  # import math
  # from string import ascii_lowercase, ascii_uppercase, digits
  # from bisect import bisect_left as bi_l, bisect_right as bi_r
  # import itertools
  # from functools import reduce
  # import operator as op
  # from scipy.misc import comb # float
  # import numpy as np
  import re
  
  
  def main():
      # 左がRで右がLとなっている箇所でそれぞれどちらかにあつまる。10^100 は実質無限なので距離が奇数か偶数かで場合わけ
      s = (
          sys.stdin.readline().rstrip() + "R"
      )  # 後々のループ処理のときのことを考えて最後にRを足しておく
      n = len(s) - 1
      all_occurrences_of_rl = [m.start() for m in re.finditer("RL", s)]
  
      counts = [0 for _ in range(n)]
      left = 0
      for i in range(len(all_occurrences_of_rl)):
          right = all_occurrences_of_rl[i] + 1
          while s[right + 1] == "L":  # 次がLだったら右端を拡張していく
              right += 1
  
          r_count = (
              1
              + (all_occurrences_of_rl[i] - left) // 2
              + (right - all_occurrences_of_rl[i]) // 2
          )
          l_count = (right - left + 1) - r_count
          counts[all_occurrences_of_rl[i]] = r_count
          counts[all_occurrences_of_rl[i] + 1] = l_count
  
          left = right + 1
  
      for i in range(n):
          print(counts[i], end=" ")
  
  
  if __name__ == "__main__":
      main()
  
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"}]