#include <iostream>

using namespace std;

int main(void){
	int n;
	while(cin >>n,!cin.eof()){
		int i=1;
		if(i&n)
			cout << i;
		i <<=1;
		while(i<=n){
			if(i&n)
				cout << ' ' << i ;
 			i <<=1;
		}
		cout << endl;
	}
	return 0;
}