#include <iostream>
using namespace std;

int main()
{
	int n, count = 0, sum = 1;
	int ans[100][9], data[100] = {0}, ansdata[100];
	for (int a = 0; a <= 9; a++) {
		data[a+1] = sum;
		sum = sum * 2;
	}
	while (cin >> n) {
		sum = 0;
		int count2 = 0,sin=1;
		for (int a = 0; a <= 9; a++) {
			if (n % 2 == 0 && sin==1) {
				sum = sum - 1;
			}
			sum = sum + data[a + 1];
			ans[count][count2] = a+1;
			if (sum > n) {
				sum = sum - (data[a]);
				count2 = count2 - 1;
				ans[count][count2] = a + 1;
				a--;
			}
			if (n % 2 == 0 && sin == 1) {
				count2--;
				sin = 2;
			}
			count2++;
			if (sum == n)
				break;
		}
		ansdata[count] = count2;
		count++;
	}
	for (int a = 0; a <= count; a++) {
		for (int b = 0; b < ansdata[a]; b++) {
			cout << data[ans[a][b]]<< " ";
		}
		cout << endl;
	}
	return 0;
}