#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, cur;
    scanf("%d", &n);
    for (cur = 1; n > 3; n >>= 1, cur <<= 1)
        for (int i = 0; i < (n + 1) >> 1; i++)
            printf("%d ", cur);
    if (n == 1)
        printf("%d\n", cur);
    if (n == 2)
        printf("%d %d\n", cur, cur * 2);
    if (n == 3)
        printf("%d %d %d\n", cur, cur, cur * 3);
    return 0;
}