#include<iostream>
#include<map>
#include<vector>
#include<list>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<numeric>
#include<climits>
#include<ctime>
#include<cstring>
#define REP(i,p,n) for(int i=p;i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))
#define all(c) (c).begin(), (c).end()

using namespace std;
template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; }
template<class T> inline void chmin(T& a, T b) { if(b < a) a = b; }

int main() {
	int num[10] = {512,256,128,64,32,16,8,4,2,1};
	int N;

	while (cin >> N) {
		vector<int> ans;
		rep(i,10) {
			if (N >= num[i]) {
				ans.push_back(num[i]);
				N = N - num[i];
			}
		}
		reverse(all(ans));
		rep(i,ans.size()) {
			if (i == ans.size()-1) {
				cout << ans[i];
			}
			else {
				cout << ans[i] << " ";
			}
		}
		cout << endl;
	}

	return 0;
}