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

int main(){
    bool fundo[10] = {false};
    int value[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};

    int weight;
    bool space_need = false;

    while(cin >> weight){
        for(int i=0; i<=9; i++){
            if(weight % 2 == 1){
                fundo[i] = true;
            }
            weight /= 2;
        }

        for(int i=0; i<=9; i++){
            if(fundo[i] == true){
                if(space_need) printf(" ");
                printf("%d", value[i]);
                fundo[i] = false;
                space_need = true;
            }
        }
        cout << endl;
        space_need = false;
    }

    return 0;
}