#include<iostream>
using namespace std;
int main(){
  int w,j;
  int h[10]={1,2,4,8,16,32,64,128,256,512};
  while(cin>>w){
    if(w%2!=0){
      cout << h[0] << ' ';
      w -= 1;
    }
    for(int i=1;i<10;i++){
      if(w==h[i]){
	cout << h[i] << endl;
	w = 0;
	break;
      }
    }
    if(w!=0){
      j = 1;
      while(w!=0){
	cout << h[j];
	w -= h[j];
	j++;
	if(w==0) cout << endl;
	else cout << ' ';
      }
    }
  }
    return 0;
}