#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<ctime>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<bitset>
#include<utility>
#include<string>

using namespace std;

int bun[10]={1,2,4,8,16,32,64,128,256,512};

main(){
  int n;
  int i,j,temp;
  while(cin >> n){
    int c[15]={0};
    for(i=9;n!=0;i--){
      if(bun[i]<=n){
	n-=bun[i];
	c[i]=1;
      }
    }
    for(i=0;i<10;i++){
      if(c[i]==1){
	cout << bun[i];
      }
      if(c[i+1]==1){
	cout <<' ';
      }
    }
    puts("");
  }
}