#include<iostream>
using namespace std;

int main() {
	int n;
	while (cin >> n) {
		int pow[10] = {}, p = 0, rem, quo;
		while (1) {
			rem = n % 2; quo = n / 2;
			if (rem) {
				pow[p]++;
			}
			if (quo == 0) break;
			p++;
			n = quo;
		}
		for (int i = 0, j = 0, r = 1; i < 10; i++, r *= 2) {
			if (pow[i]) {
				if (j) cout << " ";
				cout << r;
				j++;
			}
		}
		cout << endl;
	}
}
