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

int main(){
	int n;
	int bit[10];
	for(int i=0;i<10;i++){
		int a = 1;
		for(int j=0;j<i;j++) a *= 2;
		bit[i] = a;
	}
	while(cin>>n){
		bool s = false;
		int k[10];
		for(int i=0;i<10;i++){
			k[i] = n%2;
			n = (n-k[i])/2;
			if(k[i]==1){
				if(not s){ s = true; cout << bit[i];}
				else cout << " " << bit[i];
			}
		}
		cout << endl;
	}
}