#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <sstream>
#include <cstdio>
#include <stack>
using namespace std;

// Weight(0031)
int main()
{
	int n;
	const int pow2[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
	while (cin >> n) {
		vector<int> ans(10, 0);
		int p_i = 9;
		while (p_i >= 0) {
			if (n >= pow2[p_i]) {
				n -= pow2[p_i];
				ans[p_i] = 1;
			}
			--p_i;
		}

		for (unsigned int i = 0; i < ans.size(); ++i) {
			if (ans[i])
				cout << pow2[i] << " ";
		}
		cout << endl;
	}
	return 0;
}