#include <iostream>
using namespace std;
int main(){
  int n;
  while(cin >> n){

    int ans[1000];
    int p = 0;

    int m = n;
    for(int i = 2 ; i < m ; i*=2){
      if(i*2 > m)m = i;
    }

    for(int i = m ;i > 0; i/=2 ){
      if(n - i >= 0 ){
	ans[p++] = i;
	n -= i;
      }
    }
  for(int i = p - 1 ; i > 0 ; i-- ){
    cout << ans[i] << " ";
  }
  cout <<ans[0]<< endl;

  }
  }