#include <iostream>
#include <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif



int main(int argc, char **argv){
	int weight[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
	int w = 0;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif


#if INPUT_FROM_FILE
	while(ifs >> w){
#else
	while(std::cin >> w){
#endif
		std::vector<int> binary_expression;
		std::vector<int> result;
		while(w > 0){
			binary_expression.push_back(w % 2);
			w = w / 2;
		}

		for(int i = 0; i < binary_expression.size(); i++){
			if(binary_expression[i] > 0){
				result.push_back(weight[i]);
			}
		}
		
		std::cout << result[0];
		for(int i = 1; i < result.size(); i++){
			std::cout << " " << result[i];
		}
		std::cout << std::endl;
	}

	return 0;
}
