#include <stdio.h>

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

int get_ans(int a, int rem)
{
	int i = a-1;

	while(rem >= weights[i] || i >= 0){
		if(rem > weights[i]) break;
		else if(rem == weights[i]) return weights[i];

		i--;
	}

	printf("%d ", get_ans(i, rem - weights[i]));

	return weights[i];
}

int main()
{
	int G, A;

	while(scanf("%d", &G) != EOF){
		printf("%d ", get_ans(10, G));
		printf("\n");
	}

	return 0;
}