#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<queue>
#include <climits>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod = 1e9 + 7;
const long long INF = 1LL << 60;


int main() 
{
    int w[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
    int n;
    while(cin >> n){
        vector<int> v;
        for(int i = 9; i >= 0; i--){
            if(n>=w[i]){
                v.push_back(w[i]);
                n-=w[i];
            }
        }
        reverse(v.begin(),v.end());
        for(int i = 0; i < v.size(); i++){
            cout << v[i];
            if(i!=v.size()-1){
                cout << ' ';
            }
        }
        cout << endl;
    }
}


