#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> m, ans;
  int n, x=1;
  m.push_back(x);
  for(int i=0; i<9; i++){
    x = x*2;
    m.push_back(x);
  }
  sort(m.begin(), m.end(), greater<int>());

  while(cin >> n){
    ans.clear();
    if(n > 1023) return 0;
    vector<int>::iterator it = m.begin();
    while( it != m.end() ){
      if(n - *it >= 0){
	n = n - *it;
	ans.push_back(*it);
      }
      ++it;
    }
    sort(ans.begin(), ans.end());
    vector<int>::iterator it2 = ans.begin();
    while( it2 != ans.end() ){
      cout << *it2 << " ";
      ++it2;
    }
    cout << endl;
    
  }
  return 0;
}