#include <bits/stdc++.h>
using std::cin;
using std::cout;
int n;
inline int read() {
  int x = 0, y = 1;
  static std::streambuf *fb = cin.rdbuf();
  char ch = fb->sbumpc();
  while (!isdigit(ch)) {
    if (ch == '-') y = -1;
    ch = fb->sbumpc();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = fb->sbumpc();
  }
  return x * y;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int cnt = 0;
  for (int i = 1;; i <<= 1) {
    if (n - cnt <= 3) {
      n -= cnt;
      int j = i;
      for (; n > 1; --n, j += i) {
        cout << i << ' ';
      }
      cout << j << '\n';
      break;
    }
    for (int j = i; j <= n; j += (i << 1)) {
      cout << i << ' ';
      ++cnt;
    }
  }
  return 0;
}
