#include <stdio.h>

int main(void) {
    int n;

    printf("Input positive integer: ");
    scanf("%d", &n);

    if (n <= 1) {
        return 1;
    }

    int i = 2;

    while (i <= n) {
        printf("%d ", i);
        i <<= 1;
    }

    printf("\n");

    return 0;
}
