#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i,in;
  int w[10] = {1,2,4,8,16,32,64,128,256,512};

  while(cin >> in){
    vector<int> ans;
    string to;

    for(i=0;in;i++){ to += in%2 + '0'; in /= 2;}
    rep(i,to.size()) if(to[i] == '1') ans.push_back(w[i]);
    rep(i,ans.size()){
      cout << ans[i];
      (i == ans.size()-1) ? cout << endl : cout << " ";
    }
  }


  return 0;
}