//
//
//
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <algorithm>

using namespace std;

int main(void) {
	int a[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
	int sample = 129;
	vector<int> ans;
	int res = sample;
	while(res != 0){
		for (int i = 0; i < 10; i++) {
			if(sample - a[i] < 0){
				continue;
			}
			if((sample - a[i]) < res) {
				res = sample - a[i];
			}
		}
		ans.push_back(sample - res);
		sample = res;
	}
	for(int i = 0; i < ans.size()-1; ++i){
		cout << ans[i] << " ";
	}
	cout << ans.back() << endl;
	return 0;
}