#include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
#include<map>
#include<vector>
#define int long long
using namespace std;
int test[51];
signed main() {
    int n;
    while (cin >> n) {
        int a = 0;
        if (n >= 512) { test[a] = 512; a++; n -= 512; }
        if (n >= 256) { test[a] = 256; a++; n -= 256; }
        if (n >= 128) { test[a] = 128; a++; n -= 128; }
        if (n >= 64) { test[a] = 64; a++; n -= 64; }
        if (n >= 32) { test[a] = 32; a++; n -= 32; }
        if (n >= 16) { test[a] = 16; a++; n -= 16; }
        if (n >= 8) { test[a] = 8; a++; n -= 8; }
        if (n >= 4) { test[a] = 4; a++; n -= 4; }
        if (n >= 2) { test[a] = 2; a++; n -= 2; }
        if (n >= 1) { test[a] = 1; a++; n -= 1; }
        sort(test, test + a);
        for (int h = 0; h < a; h++) {
            if (h != a - 1)cout << test[h] << ' ';
            else cout << test[h];
        }
        cout << endl;
    }
}
