#include <iostream>

int main(int argc, const char * argv[])
{
    int cu[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
    int g, j = 0, cu2[10] = {0};
    scanf("%d", &g);
    
    for (int i = 0; i < 10; i++) {
        if ((g - cu[i]) < 0) {
            g -= cu [i - 1];
            cu2[j] = cu[i - 1];
            i = 0; j++;
        }
        if (g == 0) break;
    }
    for (int i = 0; i < j / 2; i++) {
        int tmp;
        tmp = cu2[j - 1 - i];
        cu2[j - 1 - i] = cu2[i];
        cu2[i] = tmp;
    }
    
    for (int i = 0; i < j; i++) {
        printf("%d ", cu2[i]);
    }
    puts("");
    
    return 0;
}