#include <iostream>
#include <vector>

using namespace std;

int main() {

	int weight;
	int temp[10];
	temp[9] = 512;
	vector<int> ans;

	for (int i = 8; i >= 0; i--)
		temp[i] = temp[i + 1] / 2;

	while (cin >> weight) {

		ans.clear();

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

			if (weight - temp[i] >= 0) {

				weight -= temp[i];
				ans.push_back(temp[i]);

			}
		}

		for (int i = ans.size() - 1; i > 0; i--)
			cout << ans[i] << " ";

		cout << ans[0] << "\n";

	}
	return 0;

}


