implicit none

integer :: n
character(100000) :: s
integer :: i, j, R, L, i_begin, nblock
integer, allocatable :: n_R(:), n_L(:)
logical :: flg_RL, flg_space

read *, s
n = len_trim(s)

allocate(n_R(n))
allocate(n_L(n))

flg_RL = .false.
i_begin = 1
nblock = 1

do i = 1, n-1
   if (.not. flg_RL) then
      if (s(i:i) == 'R' .and. s(i+1:i+1) == 'L') then
         n_R(nblock) = i - i_begin
         flg_RL = .true.
      endif
   else
      if (s(i+1:i+1) == 'R') then
         n_L(nblock) = i - i_begin - n_R(nblock) - 1
         i_begin = i + 1
         nblock = nblock + 1
         flg_RL = .false.
      endif
   endif
enddo

n_L(nblock) = n - i_begin - n_R(nblock) - 1

flg_space = .false.

do i = 1, nblock
   if (flg_space) then
      write(6,'(a)',advance='no') ' '
   endif

   do j = 1, n_R(i)
      write(6,'(a)',advance='no') '0 '
   enddo

   R = 1
   L = 1
   if (mod(n_R(i),2) == 0) then
      R = R + n_R(i) / 2
      L = L + n_R(i) / 2
   else
      R = R + n_R(i) / 2
      L = L + n_R(i) / 2 + 1
   endif

   if (mod(n_L(i),2) == 0) then
      R = R + n_L(i) / 2
      L = L + n_L(i) / 2
   else
      R = R + n_L(i) / 2 + 1
      L = L + n_L(i) / 2
   endif

   write(6,'(i0,1x,i0)', advance='no') R, L

   do j = 1, n_L(i)
      write(6,'(a)',advance='no') ' 0'
   enddo
   
   flg_space = .true.
enddo

write(6, '(a)') ''
stop
end