weight = [512, 256, 128, 64, 32, 16, 8, 4, 2, 1]

while n = gets
  n = n.to_i
  arr = []
  weight.each{|w|
    if n >= w
      n -= w
      arr.unshift(w)
      break if n == 0
    end
  }
  puts arr.join(" ")
end