#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;

int main() {
	int n;
	int w[10];
	int b[10];
	
	while (cin >> n) {
		for (int i=9;i>=0;i--){
			w[i] = pow(2,i);
			if (n >= w[i]) {
				n = n - w[i];
				b[i] = 1;
			}
			else { b[i] = 0; }
		}
		for (int i = 0; i <= 8; i++) {
			if (b[i]==1) {
				cout << w[i] << " ";
			}
		}
		if (b[9] == 1) {
			cout << w[9];
		}
		cout << endl;
	}
}