data = [1,2,4,8,16,32,64,128,256,512]
while line = gets
  result = []
  line.to_i.to_s(2).reverse.split(//).each_with_index do |elem,index|
    result << data[index] if elem == "1"
  end
  puts result.join(" ")
end