#include <cstdio>
#include <iostream>

using namespace std;

int vis[10];
int gs[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};

int main() {
	int n;
	while (scanf("%d", &n) != EOF) {
		for (int i=0; i<10; ++i) vis[i] = 0;
		for (int i=9; i>=0; --i) {
			if (n >= gs[i]) {
				vis[i] = 1;
				n -= gs[i];
			}
			if (n <= 0) break;
		}
		int cs = 0;
		for (int i=0; i<10; ++i) {
			if (vis[i]) printf (cs++ ? " %d" : "%d", gs[i]);
		}
		printf ("\n");
	}
	return 0;
}