S = gets.chomp
N = S.size

seq = 0
max_seq = 0
prev = nil
run = []
N.times do |i|
  if prev == S[i]
    seq += 1
  else
    run << [prev] * (seq + 1) unless prev.nil?
    seq = 0
  end
  max_seq = seq if seq > max_seq
  prev = S[i]
end
run << [prev] * (seq + 1) unless prev.nil?

res = []
run.each_slice(2) do |r, l|
  even_r = r.count / 2
  odd_r = r.count - even_r
  even_l = l.count / 2
  odd_l = l.count - even_l
  if r.count % 2 == 0
    res << [0] * (r.count - 1) + [even_r + even_l, odd_r + odd_l] + [0] * (l.count - 1)
  else
    res << [0] * (r.count - 1) + [even_r + odd_l, odd_r + even_l] + [0] * (l.count - 1)
  end
end
puts res.flatten.join(" ")
