//0031
//include-------------------------------------
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<stack>

using namespace std;

//typedef--------------------------------------
typedef vector<int> VI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

#define MP make_pair

//repetition-----------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)

//constant-------------------------------------
const double PI = acos(-1.0);

//cout,cin-------------------------------------
#define COUT(x) cout<<(x)<<endl;
#define CIN(x) cin>>(x);

const int weight[10] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };

int main(){

	int w;
	while (1){
		vector <int> v;
		CIN(w)
		int p = 0;
		for (int i = 9; i >= 0; i--){
			if (w >= weight[i]) {
				v[p] = weight[i];
				p++;
				w -= weight[i];
			}
		}

		for (int i = v.size(); i >= 0; i--){
			cout << v[v.size() - i];
			if (i > 0) cout << " ";
		}
		
		cout << endl;
	}

	return 0;

}