#include <bits/stdc++.h>
using namespace std;
inline void write(int x) { cout << x << ' '; }
void transform(int n, int mul) {
write(mul);
switch (n) {
case 1:
return;
case 2:
write(2*mul); return;
case 3:
write(mul), write(3*mul); return; }
for (int q = (n-1)/2, i = 0; i < q; ++i)
write(mul);
transform(n/2,2*mul); }
int main() {
int n;
ios_base::sync_with_stdio(false), cin.tie(nullptr), cin >> n, transform(n,1); }
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbmxpbmUgdm9pZCB3cml0ZShpbnQgeCkgeyBjb3V0IDw8IHggPDwgJyAnOyB9Cgp2b2lkIHRyYW5zZm9ybShpbnQgbiwgaW50IG11bCkgewoJd3JpdGUobXVsKTsKCXN3aXRjaCAobikgewoJY2FzZSAxOiAKCQlyZXR1cm47CgljYXNlIDI6IAoJCXdyaXRlKDIqbXVsKTsgcmV0dXJuOwoJY2FzZSAzOiAKCQl3cml0ZShtdWwpLCB3cml0ZSgzKm11bCk7IHJldHVybjsgfQoJZm9yIChpbnQgcSA9IChuLTEpLzIsIGkgPSAwOyBpIDwgcTsgKytpKQoJCXdyaXRlKG11bCk7Cgl0cmFuc2Zvcm0obi8yLDIqbXVsKTsgfQoKaW50IG1haW4oKSB7CglpbnQgbjsKCWlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpLCBjaW4udGllKG51bGxwdHIpLCBjaW4gPj4gbiwgdHJhbnNmb3JtKG4sMSk7IH0KCQ==