#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, prev = 1, last = 0;
  cin >> n;
  vector<int> ans;
  vector<bool> used(n + 1);
  for (int i = 2; i <= n; i *= 2) {
    ans.push_back(prev);
    last = 0;
    for (int j = i + 1; j <= n; j++) {
      if (!used[j] && j % i != 0) {
        ans.push_back(prev);
        last = max(last, j);
        used[j] = true;
      }
    }
    prev = i;
    if (i * 2 > n) {
      if (last > i) prev = last;
    }
  }
  ans.push_back(prev);
  for (auto x : ans) cout << x << " ";
  return 0;
}
