#include<iostream>

using namespace std;

int main(){
	int n,d[10]={512,256,128,64,32,16,8,4,2,1};
	bool a[10];
	while(cin>>n){
		for(int i=0;i<10;i++){
			a[i]=false;
			while(d[i]<=n){n-=d[i];a[i]=true;}
		}
		
		for(int i=9;i>=0;i--)
			if(a[i]==true)cout<<d[i]<<" ";
		cout<<endl;
	}

}