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

int main(){
    int data[10] = {1,2,4,8,16,32,64,128,256,512};
    int ch[10];
    int mem;
    int sta;
    while(cin >> sta){
        mem = 0;
        memset(ch,0,sizeof(ch));
        for(int i=9;i>=0;i--){
            if(sta >= data[i]){
                if(mem == 0) mem = i;
                sta -= data[i];
                ch[i] = 1;
            }
        }
        for(int i=0;i<10;i++){
            if(mem == i) cout << data[i] << endl;
            else if(ch[i] == 1){
                cout << data[i] << " ";
            }
        }
    }
}