#include <iostream>
#include <cmath>

using namespace std;

int main() {
	int a;
	while (cin >> a) {
		int p[10] = {0};
		int count = a;
		int han;
		while (count != 0) {
			//hantei = 0;
			for (int i = 9; i >= 0; i--) {
				if (count >= (int)pow(2,i)) {
					count -= (int)pow(2,i);
					p[i] = 1;
					//hantei = 1;
					break;
				}
			}
		}
		for (int i = 0; i < 10; i++) {
			if (p[i] == 1) {
				cout << (int)pow(2,i);
				han = i+1;
				break;
			}
		}

		for (int i = han; i < 10; i++) {
			if (p[i] == 1) {
				cout << " " << (int)pow(2,i);
			}
		}

		cout << endl;
	}
	return 0;
}