import std.stdio, std.string, std.conv, std.algorithm, std.range;
void main() {
	int n;
	while ("%d\n".readf(&n))
		format("%b",n).map!(to!int).map!"a-48".enumerate.map!"2^^a[0]*a[1]".filter!"a>0".map!(to!string).join(" ").writeln;
}