#include <iostream>

using namespace std;
int weight[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};

void solve()
{
	int w;
	while(cin >> w)
	{
		bool flag[10];
		int sumcount = 0;
		for(int i = 0; i < 10; ++i)
		{
			flag[i] = false;
		}
		for(int i = 9; i >= 0; --i)
		{
			if(w >= weight[i])
			{
				w -= weight[i];
				flag[i] = true;
				++sumcount;
			}
		}
		int count = 0;
		for(int i = 0; i < 10; ++i)
		{
			if(flag[i] && sumcount > count + 1)
			{
				cout << weight[i] << " ";
				++count;
			}
			else if(flag[i] && sumcount == count + 1)
			{
				cout << weight[i];
			}
		}
		cout << endl;
	}
}

int main()
{
	solve();
	return(0);
}