var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n").map(Number);
var w=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512];
w.reverse();
for(var i=0;i<Arr.length;i++){
   var a=Arr[i];
   var arr=[];
   w.forEach(function(v){
      if(a>=v){
         a=a-v;
         arr.push(v);
      }
   });
console.log(arr.reverse().join(" "));
}