#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define SPACE " "

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 1LL << 25;
double EPS = 1e-9;
int numofbits(int bits)
{
    bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
    bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
    bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
    bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
    return (bits & 0x0000ffff) + (bits >>16 & 0x0000ffff);
}

// BEGIN //////////////////////////////////////////////////////////////
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    if (n == 0) {
      cout << 0 << endl;
      continue;
    }
    vector<int> ans;
    if (n % 2 == 1) {
      n -= 1;
      ans.push_back(1);
    }
    int t = 2;
    while (n) {
      if (numofbits(n) == 1) {
        ans.push_back(n);
        break;
      }
      n -= t;
      ans.push_back(t);
      t *= 2;
    }
    REP(i, ans.size() - 1) {
      cout << ans[i] << SPACE;
    }
    cout << ans[ans.size() - 1]endl;
  }
	return 0;
}
// END   //////////////////////////////////////////////////////////////