#include<iostream>
#include<vector>
int main(){
	int w;
	int weight[10]={1,2,4,8,16,32,64,128,256,512};
	while(1){
		std::vector<int> vec;
		int a=0;
		std::cin>>w;
		if(std::cin.eof())break;
		//if(w==0)break;
		while(w>0){
			if(w%2!=0)vec.push_back(weight[a]);
			w/=2;
			a++;
		}
		for(int i=0;i<vec.size()-1;i++)std::cout<<vec[i]<<" ";
		std::cout<<vec[vec.size()-1]<<std::endl;
	}
	return 0;
}