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

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

int main(){
	while(scanf("%d", &weight) != EOF){
		count = 0;
		for(int i=9; 0 <= i; i--){
			if(temp[i] <= weight){
				weight -= temp[i];
				ans[count] = temp[i];
				count++;
			}
			if(weight == 0) break;
		}
		for(int i=count-1; 0 <= i; i--){
			if(i != 0) cout << ans[i]  << ' ';
			else cout << ans[i] << endl;
		}
	}
}