module AOJ_Volume0031;

import std.stdio,std.string,std.conv,std.math,std.algorithm,std.container;

int main()
{
	int[] value;
	value.length = 10;
	auto v = Array!int();

	foreach(i;0..10)
	{
		value[i] = pow(2,i);
	}

	sort!("a > b")(value);

	string s;
	while((s = readln.chomp).length != 0)
	{
		int w = s.to!int;
		v.clear();
		foreach(i;0..10)
		{
			if(value[i] <= w)
			{
				w -= value[i];
				v.insertBack(value[i]);
			}

		}

		for(size_t i = v.length-1; i>= 0;i--)
		{
			if(i == 0)
			{
				writeln(v[i]);
				break;
			}
			else
			{
				write(v[i]," ");
			}
		}
	}
	return 0;
}