#include <iostream>
using namespace std;
int main()
{
	const int b[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
	int w, i, j, t, a[10];
	while (cin >> w)
	{
		if (cin.eof()) return 0;
		for (i = 9, j = 0, t = 0; i >= 0; i--)
		{
			if (w >= t + b[i])
			{
				a[j] = b[i];
				t += a[j];
				if (w == t + b[i])
					break;
				j++;
			}
		}
		for (i = j - 1; i > 0; i--)
			cout << a[i] << " ";
		cout << a[0] << endl;
	}

	return 0;
}