#include <deque>
#include <iostream>
#include <cmath>

using namespace std;

int main() {

	int i, j, l, n, x;
	deque<int> g;

	while(cin >> n) {
		j=0;
		x=0;
		for(i=9; ; i--) {
			l=pow((double)2, (double)i);
			if(l+x<=n) {
				x+=l;
				g.push_back(l);
				j++;
			}
			if(x==n)
				break;
		}
		for(j-=1; j>0; j--) {
			cout << g[j] << " ";
		}
		cout << g[j] << endl;
		g.clear();
	}

	return 0;

}