#include <cstdio>
using namespace std;

int main(){
	int n, g;
	while(scanf("%d\n", &g) != EOF){
		n = 1;
		while(g > 0){
			if(g % (n * 2) > 0){
				printf("%d", n);
				g -= n;
				printf("%c", (g > 1)? ' ' : '\n');
			}
			n *= 2;
		}
	}
}