#include<iostream>
#include<algorithm>
using namespace std;

int main(){

  int n;

  while(cin >> n){

    int z = 512,a[100] = {0},count = 0,count2 = 0;

    for(int i=10;i>0;i--){

      if(n - z >= 0){
	n -= z;
	a[i] = z;
	count++;
      }
      z /= 2;
    }

    for(int i=1;i<=10;i++){

      if(a[i] != 0){
	cout << a[i];
	count2++;

	if(count2 == count) break;
	cout << " ";

      }
    }

    cout << endl;

  }
}