#include <iostream>
#include <vector>
#include <math.h>
using namespace std;

int main()
{
	int nishin[] = {1,2,4,8,16,32,64,128,256,512};
	int n;
	vector<int> result;

	while(cin >> n) {
		result.clear();
		while(true) {
			if(n<=0) break;
			if(n%2 == 1) result.push_back(1);
			else		 result.push_back(0);
			n /= 2;
		}
		for(int i=0;i<result.size();i++) 
			if(result[i] == 1) cout << pow(2,i) << ' ';
		cout << '\n';
	}

	return 0;
}