#include<cstdio>
#include<iostream>

using namespace std;

int main(void){

	int inp,arr[100],cnt;
	int wei[]={1,2,4,8,16,32,64,128,256,512};

	while(cin>>inp){
		cnt=0;
		for(int i=9;inp!=0;i--){
			if(inp-wei[i]>=0){
				inp-=wei[i];
				arr[cnt]=wei[i];
				cnt++;
			}
		}
		for(int j=cnt-1;j>=0;j--){
			cout<<arr[j];
			if(j==0) cout<<endl;
			else cout<<" ";
		}
	}

	return 0;
}