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

using namespace std;

int main()
{
	int targ, square[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
	vector<int> num;
	while(cin >> targ)
	{
		if(targ == 0) break;

		for(int i = 9; i >= 0; i--)
		{
			if(targ >= square[i])
			{
				num.push_back(i);
				targ -= square[i];
			}
		}

		for(int i = num.size()-1; i >= 0; i--)
		{
			cout << square[ num[i] ];
			if(i != 0) cout <<" ";
			else cout << endl;
		}
		num.clear();
	}
}