#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int w[]={1,2,4,8,16,32,64,128,256,512};
main(){
  int n;
  while(cin >>n){
    vector<int> ans;
    for(int i=9;i>-1;i--){
      if(w[i]<=n){
	ans.push_back(w[i]);
	n-=w[i];
      }
    }
    reverse(ans.begin(),ans.end());
    int m=ans.size();
    for(int i=0;i<m;i++){
      printf("%d",ans[i]);
      if( i==m-1 ) printf("\n");
      else printf(" ");
    }
  }
}