#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main(void) {
  int g[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
  int w;
  vector<int> sum;
  
  while(cin >> w) {
    sum.clear();
    for(int i = 9 ; i >= 0 ; i--) {
      if(g[i] <= w) {
	w -= g[i];
	sum.push_back(g[i]);
      }
    }
    sort(sum.begin(), sum.end());
    for(int i = 0 ; i < sum.size() ; i++) {
      if(i != sum.size()-1) cout << sum[i] << ' ';
      else cout << sum[i] << endl;
    }
  } 
  return 0;
}