program sample
    implicit none
    character(200000)::s
    integer(8) :: i,j,m,n
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) s
    n=len_trim(s)
    allocate(x(n))
    x(:)=1
    do i=1,n-1

        if(s(i:i+1) .eq. 'RR')then
            x(i+2)=x(i+2)+x(i)
            x(i)=0
        end if
    end do
    do i=n,2,-1

        if(s(i-1:i) .eq. 'LL')then
            x(i-2)=x(i-2)+x(i)
            x(i)=0
        end if
    end do

  
    write(*,*) x
  
    stop
end program sample
  

