#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n;
  int w;
  while (cin >> n) {
    vector<int> v;
    w = 512;
    while (n) {
      if (n >= w) {
        v.push_back(w);
        n -= w;
      }
      w /= 2;
    }
    int i;
    for (i = v.size() - 1; i >= 0; i--) {
      cout << v[i];
      if (i) {
        cout << ' ';
      }
    }
    cout << endl;
  }
  return 0;
}

