#main
arr = Array.new
while n = gets
  arr << n.to_i
end
arr.each do |n|
  b = Array.new
  until n / 2 == 0
    b << n % 2 
    n = n / 2
  end
  0.upto (b.length - 1) do |i|
    if b[i] == 1
      print "#{2 ** i} "
    end
  end
  puts 2 ** (b.length)
end