#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    int n;
    while(cin>>n){
        int weight=512,weights=1,flags=0;
        bool flag[15]={0};
        for(int i=1;i<11;i++){
            if(n-weight>=0){
                flag[i]=1;
                n-=weight;
            }
            weight/=2;
        }
        for(int i=10;i>0;i--){
            if(flag[i]==1&&flags==1){
                cout<<" ";
                flags=0;
            }
            if(flag[i]==1){
                flags=1;
                cout<<weights;
            }
            weights*=2;
        }
        cout<<endl;
    }
    return 0;
}