#include<iostream>
using namespace std;
int a[10] = {1,2,4,8,16,32,64,128,256,512};
int weight,b[11];


int main(){
  while(cin >> weight){
    int l = 0;
    for(int i = 0;i<10;i++)
      b[i] = 0;
    while(weight != 0){
      for(int i =9;i>=0;i--){
	if(weight >= a[i]){
	  weight = weight - a[i];
	  b[i] = 1;
	}
      }
    }
    for(int i=0;i<10;i++){
     
      if(b[i] == 1){
	   if(l != 0) cout << " ";
	   cout << a[i]; l++;
	}

    }
    cout << endl;
  }
}