#include <iostream>
#include <cmath>

using namespace std;

int main(void) {
	int weight;
	while(cin >> weight) {
		int bundo[10];
		for(int i = 9; i >= 0; i--) {
			if(weight >= pow(2, i)) {
				bundo[i] = 1;
				weight -= pow(2, i);
			} else {
				bundo[i] = 0;
			}
		}
		
		for(int i = 0; i < 8; i++) {
			if(bundo[i] == 1) {
				cout << pow(2, i) << ' ';
			}
		}
		if(bundo[9] == 1) {
			cout << pow(2, 9);
		}
		cout << endl;
	}
	
	return 0;
}