#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n;
  vector<int>a;
  for(int i = 1 ; i <= 1024 ; i*=2 )a.push_back(i);
  while( cin >> n ){
    vector<int>ans;
    int p = a.size();
    for(int i = p-1 ; i >= 0 ; i-- ){
      if(n-a[i] >= 0){
	ans.push_back(a[i]);
	n-=a[i];
      }
      if(n == 0)break;
    }
    for(int i = ans.size()-1 ; i >= 0 ; i-- ){
      if(i == (int)ans.size()-1)cout << ans[i]; 
      else cout <<" "<< ans[i];
    }
    cout << endl;
  }
}