#include<bits/stdc++.h>
using namespace std;
typedef vector<int>V;
int main(void){
	int n,m;
	int box[10]={512,256,128,64,32,16,8,4,2,1};
	int sum;
	V v;
	int i;
	while(1){
		cin>>n;
		if(cin.eof())	break;
		m=0;
		v.clear();
		while(1){
			if(n==0||m==10)	break;
			if(n-box[m]>=0){
				//cout<<box[m]<<endl;
				n-=box[m];
				v.push_back(box[m]);
			}
			//cout<<"N="<<n<<"M="<<m<<endl;
			m++;
		}
		reverse(v.begin(),v.end());
		for(i=0;i<(int)v.size();i++){
			if(i)	cout<<" ";
			cout<<v[i];
		}
		cout<<endl;
	}
	return 0;
}
