def get_weight( n, ans )
	fundou = [ 512, 256, 128 , 64, 32, 16, 8, 4, 2,1 ]
	fundou.each{ |f|
		if n >= f
			n -= f
			ans << f 
		end
	}
	ans.reverse!
end

answers = Array.new
while line = $stdin.gets
	ans = Array.new
	weight = line.chomp.to_i
	get_weight( weight, ans )
	answers << ans.dup
end
answers.each{ |a|
	a.each_with_index{ |e,i| 
		if i > 0
			print " "
		end
		print e
	}
	puts
}
