#include <stdio.h>
#include<iostream>
using namespace std;

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

int main(){
	int i = 1, n;
	bool p[10];

	while(scanf("%d", &n) != EOF){
		fill(p, p+10, false);

		for(int i= 9; 0 <= i; i--){
			if(n == 0) break;
			if(weight[i] <= n){
				p[i] = true;
				n -= weight[i];
			}
		}
		for(int i =0; i < 10; i++){
			if(p[i]) cout << weight[i] << ' ';
		}
		cout << endl;
	}
	return 0;
}