#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int w;

	while ( cin >> w )
	{
		set<int> weights;

		for ( int i = 8; 0 <= i; i-- )
		{
			int weight = pow( 2.0, i );

			if ( weight <= w )
			{
				w -= weight;
				weights.insert( weight );
			}
		}

		for ( set<int>::iterator it = weights.begin(); it != weights.end(); )
		{
			cout << *it;

			if ( ++it == weights.end() )
			{
				cout << endl;
			}
			else
			{
				cout << ' ';
			}
		}
	}
	
	return 0;
}