#include <iostream>
#include <stack>

using namespace std;

void Solution()
{
    int a[10]={1,2,4,8,16,32,64,128,256,512};
    
    int n;
    
    stack<int> save;
    
    while(cin>>n)
    {
        for(int i = 9; 0 <= i; i--) // first , find out(be sure) the biggest weight.
        {
            if(n - a[i] > -1)
            {
                save.push(a[i]); //and save it at stack
                
                n = n - a[i];  //loop until n == a[i]
            }
        }
        
        while(1)
        {
            cout<<save.top(); //output the result from stack
            
            save.pop(); // delete
            
            if (save.empty())
            {
                break;
            }
            else
            {
                cout<<" ";
            }
        }
        
        cout<<endl;
    }
}

int main()
{
    Solution();
    return 0;
}