#include<iostream>
using namesapce std;
int main(){
  int n,bell,heavy[1000]={0};
  while(cin >> n){
    bell=0;
    if(n>=512){
      n-=512;
      heavy[512]++;
    }
    if(n>=256){
      n-=256;
      heavy[256]++;
    }
    if(n>=128){
      n-=128;
      heavy[128]++;
    }
    if(n>=64){
      n-=64;
      heavy[64]++;
    }
    if(n>=32){
      n-=32;
      heavy[32]++;
    }
    if(n>=16){
      n-=16;
      heavy[16]++;
    }
    if(n>=8){
      n-=8;
      heavy[8]++;
    }
    if(n>=4){
      n-=4;
      heavy[4]++;
    }
    if(n>=2){
      n-=2;
      heavy[2]++;
    }
    if(n>=1){
      n-=1;
      heavy[1]++;
    }
    for(int i=512;i!=0;i/=2){
      if(heavy[i]!=0){
	if(bell==0){
	  cout << i << endl;
	}
	else{
	  cout << " " << i;
	}
      }
    }
    cout << endl;
  }
  return (0);
}