#include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;

int main(){
	int n;
	int tai[] = {512,256,128,64,32,16,8,4,2,1};
	while(scanf("%d",&n)==1){
		vector<int> sol;
		for(int x=0;x<10 && n>0;++x){
			if(n-tai[x]>=0){
				n -= tai[x];
				sol.push_back(tai[x]);
			}
		}
		for(int x=sol.size()-1;x>0;--x){
			cout<<sol[x]<<" ";
		}
		cout<<sol[0]<<endl;
	}
	return 0;
}