#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
	int n, c;
	int a[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 516};
	int b[10];
	
	while (scanf("%d", &n) != EOF){
		c = 0;
		for (int i = 9; 0 <= i; i--){
			if (n >= a[i]){
				n -= a[i];
				b[c] = a[i];
				c++;
			}
		}
		sort(b, b + c);
		for (int i = 0; i < c; i++){
			printf("%d", b[i]);
			if (i < c - 1){
				printf(" ");
			}
		}
		
		printf("\n");
	}
	return (0);
}