#include <iostream>
using namespace std;
int main() {
    int n;
    while (cin >> n) {
        bool first = true;
        for (int i=1; i<=512; i*=2) {
            if (n & i) {
                if (first) {
                    first = false;
                    cout << i;
                } else {
                    cout << " " << i;
                }
            }
        }
        cout << endl;
    }
    return 0;
}