boxes = gets

result = Array.new(boxes.length, 0)
p1 = 0
p2 = nil
boxes.each_char.each_cons(2).with_index{|(prv, nxt), i|
  if prv == nxt
    if p2.nil?
      result[i] = 0
    else
      result[i+1] = 0
    end
  else
    if p2.nil?
      result[i]   = (i - p1)/2 + 1
      result[i+1] = (i - p1 + 1)/2
      p2 = i
    else
      result[p2]   += (i - p2)/2
      result[p2+1] += (i - p2 + 1)/2
      p1 = i + 1
      p2 = nil
    end
  end
}
result.pop()

puts(result.join(' '))
