#include <iostream>
#include <vector>
using namespace std;
int main(){
	int w[10] = {1,2,4,8,16,32,64,128,256,512};
	int n;
	while(cin>>n){
		vector<int> num;
		int b=n;
		for(int i=0;i<10;i++){
			if(b==0) break;
			if(b>=w[9-i]){
				num.push_back(w[9-i]);
				b -= w[9-i];
			}else if(b==w[9-i]) break;			
		}
		for(int j=1;j<=num.size();j++){
			if(j!=1) cout<<" ";
			cout<<num[num.size()-j];
		}
		cout<<endl;
	}
	return 0;
}