#include <stdio.h>

int main(){
	int i,w,g[10] = {1,2,4,8,16,32,64,128,256,512};
	while(scanf("%d",&w) != EOF){
		if(w % 2 == 1) {
			printf("1 ");
			w--;
		}
		for(i = 1;i < 10;i++){
			if(w % (g[i] * 2) == g[i]) {
				printf("%d ",g[i]);
				w -= g[i];
			}
			if(!w) break;
		}
		printf("\n");
	}
	return 0;
}