#include <iostream>
#include <fstream>
#include <cstdlib>

using namespace std;


int main()
{
    ifstream in("a.in");
    ofstream out("a.out");

    int n;
    in >> n;
    for (int i = 1; i <= n; i<<=1)
        out << i << ' ';
    out << '\n';

    return 0;
}