#include <iostream>
#include <algorithm>
using namespace std;
int weights[] = {1,2,4,8,16,32,64,128,256,512};
int main(){
	int n,a[10],b,c;
	while(cin >> n){
		b = 0;
		c = 10;
		while(n != 0){
			for(int i = 0;i < c;++i){
				if(n < weights[i]){
					n -= weights[i - 1];
					a[b] = i - 1;
					c = i;
					++b;
					break;
				}
			}
		}
		sort(a,a+b);
		for(int i = 0;i < b;++i){
			if(i == 0) cout << weights[a[i]];
			else cout << " " << weights[a[i]];
		}
		cout << endl;
	}
	return 0;
}