#include<iostream>
#include<bitset>
using namespace std;

void solve( int w, int* g, bitset<10> b, int i )
{
    if( i == 10 )
    {
        int sum = 0;
        int p;                              //prsentation error回避
        for( int j = 0; j < 10; j++ )
        {
            if( b[j] == 1 )
            {
                sum += g[j];
                p = j;
            }
        }
        if( w == sum )
        {
            for( int j = 0; j < 10; j++ )
            {
                if( b[j] == 1 )
                {
                    cout << g[j];
                    if( p != j )
                        cout << " ";
                }
            }
        }
        return;
    }
    b[i] = 0;
    solve( w, g, b, i + 1 );

    b[i] = 1;
    solve( w, g, b, i + 1 );

}

int main()
{
    int a = 1, w, g[10];
    bitset<10> b;

    for( int i = 0; i < 10; i++ )
    {
        g[i] = a;
        a *= 2;
    }

    while( cin >> w )
    {
        solve( w, g, b, 0 );
        cout << endl;
    }

    return 0;
}
