#include <iostream>
#include <sstream>

using namespace std;

string IntToString(int number) {
	stringstream ss;
	ss << number;
	return ss.str();
}

int main(void) {
	int in;
	int omori[] = {512,256,128,64,32,16,8,4,2,1};
	int i;
	string ret;

	while(true) {
		cin >> in;
		if(cin.eof()) { break; }
		ret = "";
		for(i = 0; i < 10; i++) {
			if(omori[i] <= in) {
				in -= omori[i];
				ret = IntToString(omori[i]) + ((ret=="")?(""):(" ")) + ret;
			}
			if(in == 0) { break; }
		}
		cout << ret << endl;
	}

	return 0;
}