#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
typedef pair<bool, int> P;

int a[10];
int v[1025][10];
int used[10];

void comv(int i, int s)
{
    if (i == 10)
    {
        rep(j, 10) v[s][j] = used[j];
        return;
    }

    used[i] = 0;
    comv(i + 1, s);
    used[i] = 1;
    comv(i + 1, s + a[i]);
}

int main()
{
    rep(i, 10)
        a[i] = pow(2, 9 - i);

    comv(0, 0);
    int n;
    while (cin >> n)
    {
        int t;
        for (int i = 9; i >= 0; i--)
            if (v[n][i] == 1)
                t = i;
        for (int i = 9; i >= 0; i--)
        {
            if (v[n][i] == 1)
                t != i ? cout << a[i] << " " : OP(a[i]);
        }
    }
    return 0;
}
