#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main() {
	
	int weight[10];
	for(int i = 0; i < 10; i++)
		weight[i] = 1 << i;
		
	int n;
	while(cin >> n){
		if(n % 2){
			n -= 1;
			cout << weight[0] << (n ? " " : "");
		}
	
		while(n){
			int c = 0;
			for(int i = n; i % 2 == 0;){
				c++;
				i /= 2;
			}
			n -= weight[c];
			cout << weight[c] << (n ? " " : "");
		}
		cout << endl;
	}
	return 0;
}