#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n;
  int cur = 1;
  while (n) {
    if (n == 3) {
      printf("%d %d %d ", cur, cur, cur * n);
      return 0;
    }
    int cnt = n / 2 + n % 2;
    n -= cnt;
    while (cnt--) printf("%d ", cur);
    cur *= 2;
  }
}
