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

int main()
{
	const int weight[] = {1,2,4,8,16,32,64,128,256,512}; 

	std::vector<int> answer;

	int n;

	while(std::cin >> n)
	{
		for(size_t i=0; i<10; ++i)
		{
			if(n/weight[9-i])
			{

				answer.push_back(weight[9-i]);

				n = n%weight[9-i];
			}
		}

		for(size_t i=0; i<answer.size()-1; ++i)
		{
			std::cout << answer[answer.size()-1-i] << ' ';
		}

		std::cout << answer[0] << '\n';

		answer.clear();
	}

}