#include <iostream>

using namespace std;

int main() {
    int scale[10];
    scale[0]=1;
    for(int i=1;i<10;i++){
    scale[i] = scale[i-1];
    }
    while(true){
    int M,i=0;
    cin >> M;
    int count=2;
    while(true){
        if(M==0) break;
        if(M % count!=0){
            M -= scale[i];
        }
        cout << scale[i] << " ";
        i++;
        count *= 2;
    }
    cout << endl;
    }
}