#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

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

bool tukauka[10];//大きい順

int n,owari;
int main(){
	while(cin >> n){
		for(int i = 0;i < 10; i++) {
			if(n >= omosa[i])tukauka[i] = true, n -= omosa[i],owari=i;
		}
		for(int i = 0; i < 10; i++) {
			if(tukauka[9 - i]&&i==owari) {
				cout << omosa[9 - i] ;
			}else {
				cout<< omosa [9 - i]<<" ";
			}
		}
		cout << endl;
		for(int i=0;i<10;i++)tukauka[i]=false;
	}
	return 0;
}