f1::String->Int->Int->[Int]
f1 "" _ _ =[]
f1 "L" p1 p2=[0]
f1 "RL" p1 p2=[(p2-p1) `div` 2+1,(p2-p1+1) `div` 2+1]
f1 "LL" _ _=[0,0]
f1 (c1:c2:cs) p1 p2
        |c1=='L' && c2=='L'=0:f1 (c2:cs) p1 (p2+1)
        |c1=='R' && c2=='R'=0:f1 (c2:cs) p1 (p2+1)
        |c1=='L' && c2=='R'=0:f1 (c2:cs) (p2+1) (p2+1)
        |c1=='R' && c2=='L'=((p2-p1) `div` 2+1):((p2-p1+1) `div` 2+1):f1 cs (p2+2) (p2+2)

f2::String->Int->Int->[Int]
f2 "" _ _ =[]
f2 "L" p1 p2=[0]
f2 "RL" p1 p2=[div (p2-p1) 2,div (p2-p1+1) 2]
f2 "LL" _ _=[0,0]
f2 (c1:c2:cs) p1 p2
        |c1=='L' && c2=='L'=0:f2 (c2:cs) p1 (p2+1)
        |c1=='R' && c2=='R'=0:f2 (c2:cs) p1 (p2+1)
        |c1=='L' && c2=='R'=0:f2 (c2:cs) (p2+1) (p2+1)
        |c1=='R' && c2=='L'=p4:p3:f2 cs (p2+2) (p2+2)
        where p3=div (p2-p1+1) 2
              p4=div (p2-p1) 2
        
f3::[Int]->[Int]->[String]
f3 [] []=[]
f3 (x:xs) (y:ys)=(show (x+y)):f3 xs ys

main = do
       x<-getLine
       putStrLn $ unwords $ f3 (f1 x 0 0) (reverse (f2 (map (\e->if e=='L' then 'R' else 'L') (reverse x)) 0 0))