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

int main() {
    int n;
    int weights[10] = {512, 256, 128, 64, 32, 16, 8, 4, 2, 1};
    
    while (cin >> n) {
        vector<int> result;
        for (int i = 0; i != 10; ++i) {
            if (n - weights[i] >= 0) {
                n -= weights[i];
                result.push_back(weights[i]);
            }
        }
        sort(result.begin(), result.end());

        for (int i = 0; i != result.size()-1; ++i) {
            cout << result[i] << " ";
        }
        cout << result[result.size()-1];
        cout << endl;
    }
    return 0;
}