#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cstdio>
using namespace std;
int n;
string bfs(int sum,string omori,int now){
    int weight[11] = {1,2,4,8,16,32,64,128,256,512};
    string weight2[11] = {"1","2","4","8","16","32","64","128","256","512"};
    if(sum==n)return omori;
    else if(now==10)return "Not_find";
    else if(sum>n)return "Not_find";
    
    string next = " ";
    if(omori=="")next = "";
    string result1 = bfs(sum+weight[now],omori+next+weight2[now],now+1);
    string result2 = bfs(sum, omori,now+1);
    if(result1!="Not_find")return result1;
    else return result2;
}

int main(){
    while (cin>>n) {
        string result = bfs(0,"",0);
        cout << result << endl;
    }
    return 0;
}