//Weight

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

bool g[65];

//?????????????????£??°??????????????°?????°??????
int count_bits(unsigned x){
    int count = 0;
    while(x){
        if(x & 1U) count++;
        x >>= 1;
    }
    return count;
}

//unsinged??????bit??°?????????
int int_bit(void){
    return count_bits(~0U);
}
//??£??°?????????????????§?????????????????????????????¨??????????°??????????????????????????´?????????????
void createArray(unsigned x){
    int n = int_bit();
    for(int i = 0; i < n; i++){
        if((x >> i) & 1U) g[i] = true; 
    }
}

int main(void){

    int i = 9;
    unsigned int x;
    int dp[10][10]; // i?????????????????????????????????weight
    //Dp??§???
    
    while((scanf("%d", &x)) != EOF){
       for(int i = 0; i < 65; i++) g[i] = false;
       createArray(x);
       
       //flag????????£???????????????????°???????????????¨???????????????
       for(int i = 0, j = 0; i < 10; i++) {
           if(g[i]) {
               if(j) printf(" ");
               printf("%d", (int)pow(2.0, (double)i));
               j++;
           }
       }
       putchar('\n');
       
    }
    
    return 0;
}