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

int main() {
  int w;
  while (cin >> w) {
    vector<int> ans;
    for (int i = 512; i >= 1; i /= 2)
      if (i <= w)
        ans.push_back(i), w -= i;

    reverse(ans.begin(), ans.end());

    for (int i = 0; i < ans.size(); ++i)
      if (i == ans.size() - 1)
        cout << ans[i] << endl;
      else
        cout << ans[i] << ' ';
  }
}
