#include <iostream>
#include <string.h>

using namespace std;
int weight[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
void solve()
{
	int a;
	while(cin >> a)
	{
		bool flag[10];
		memset(flag, 0, sizeof(bool)  * 10);
		for(int i = 9; i >= 0; --i)
		{
			if(a / weight[i])
			{
				flag[i] = true;
			}
			a %= weight[i];
		}
		for(int i = 0; i < 9; ++i)
		{
			if(flag[i])
			{
				cout << weight[i] << " ";
			}
		}
		if(flag[9])
		{
			cout << weight[9];
		}
		cout << endl;
	}
}

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