#include <iostream>
using namespace std;

int main() {
  int x;
  while(cin >> x) {
    int w[10][2]={{1},{2},{4},{8},{16},{32},{64},{128},{256},{512}};
    for(int i=9; i>=0; i--) {
      if(x-w[i][0]>=0) {
	w[i][1]=1;
	x-=w[i][0];
      }
    }
    int k=0;
    for(int i=0; i<10; i++) {
      if(w[i][1]==1) {
	if(k!=0) cout << " ";
	cout << w[i][0];
	k=1;
      }
    }
    cout << endl;
  }
  return 0;
}
