#include <stdio.h>
  int main(){
   int x[10]={1,2,4,8,16,32,64,128,256,512};
   int n,i,sum=0;
    while(scanf("%d",&n) != EOF){
		int y[10]={};
     for(i=9;i>=0;i--){
		 if(n>=x[i]){  n -= x[i]; y[i]=1; sum++;}
       }
      for(i=0;i<10;i++){
		  if(y[i]==1) {sum--; if(sum!=0){printf("%d ",x[i]);}
		  else{printf("%d\n",x[i]);
		  }}}
	  sum=0;
}
return 0;
}