function main() {
  function search(w, n, xs, sum) {
    return n === ws.length ?
      (sum === w ? xs : null) :
      search(w, n+1, xs.concat(ws[n]), sum+ws[n]) || search(w, n+1, xs, sum);
  }
  var
  ws = [1,2,4,8,16,32,64,128,256,512];
  input.forEach(function(line) {
    if(line.trim() === '') return;
    console.log(search(parseInt(line, 10), 0, [], 0).join(' '));
  });
}

var
input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main();
});