#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
	vector<int> v;
	vector<int> ans;
	int temp;
	while(1) {
		cin >> temp;
		if(cin.eof()) {
			//cout << "EOF" << endl;
			break;
		}
		v.push_back(temp);
	}
	for(auto it = v.begin(); it != v.end(); it++) {
		int weight = 512;
		for(int i=0;i<10;i++) {
			if(*it >= weight) {
				ans.push_back(weight);
				*it -= weight;
			}
			weight /= 2;
		}
		sort(ans.begin(), ans.end());
		for(auto ans_it = ans.begin(); ans_it != ans.end(); ans_it++) {
			cout << *ans_it;
			if(it - ans.begin() < 10) {
				cout << " ";
			}
		}
		cout << endl;
		ans.clear();
	}
	return 0;
}