let () =
    let main () =
        let s = read_line () in
        let len = String.length s in
        let a = Array.make len (-1) in
        for i = 0 to len - 1 do
            let rec loop prev pos =
                if a.(pos) <> -1 then a.(pos) else
                    let r =
                        if s.[pos] = prev then loop prev (if s.[pos] = 'R' then pos + 1 else pos - 1)
                            else (if prev = 'R' then pos * 2 - 1 else pos * 2 - 3)
                    in
                    let () = a.(pos) <- r in
                    r
            in
            if a.(i) = -1 then (
                let r = loop s.[i] (if s.[i] = 'R' then i + 1 else i - 1) in
                a.(i) <- r
            )
        done;
        let t = Array.make len 0 in
        Array.iteri (fun i v ->
            let va, vb = if v > i * 2 then v / 2, v / 2 + 1 else v / 2 + 1, v / 2 in
            let x = if (abs (v - i*2) /2) mod 2 = 0 then va else vb in
            t.(x) <- t.(x) + 1
        ) a;
        Array.iter (Printf.printf "%d ") t;
        print_newline ()
    in
    main ()