let s = stdin.ReadLine().ToCharArray()

let appearPatterns =
    [|
        let mutable total = 1
        for i in 0..s.Length-1 do
            if i = s.Length-1 then yield total
            else 
            match s.[i]=s.[i+1] with
            |true -> total <- total+1
            |false ->
                yield total
                total <- 1
    |]

let ans =
    let _,_,indexMap = appearPatterns|>Array.chunkBySize 2 |>Array.fold (fun (total,i,totalMap) [|x;y|] -> total+x+y,i+1,totalMap|>Map.add i (total+x-1)) (0,0,Map.empty)
    appearPatterns|>Array.chunkBySize 2|>Array.mapi(fun i [|x;y|] ->
        let mapI =indexMap.[i]
        match x%2,y%2 with
        |0,0 |1,1 -> [|(mapI ,(x+y)/2);(mapI+1,(x+y)/2)|]
        |1,0 -> [|(mapI ,(x+y)/2+1);(mapI+1,(x+y)/2)|]
        |0,1 -> [|(mapI ,(x+y)/2);(mapI+1,(x+y)/2+1)|]    
    )|> Array.collect (fun x -> x)

[
    for i in 0..s.Length-1 do
        match ans|>Map.ofArray|>Map.tryFind i with
        |Some v -> yield v
        |None -> yield 0
]|>List.map (fun x -> (string x) + " ")
|>List.iter stdout.Write
stdout.WriteLine()