#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
int n, ip[500005], lw[500005];
vector<int> pr;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  ip[1] = 1;
  ip[0] = 1;
  for (int i = 2; i <= n; i++) {
    if (!ip[i]) {
      pr.emplace_back(i);
      lw[i] = i;
      for (int j = i * 2; j <= n; j += i) {
        ip[j] = 1;
        if (lw[j] == 0) lw[j] = i;
      }
    }
  }
  for (int i = 1; i < pr.size() + 1; i++) {
    cout << 1 << " ";
  }
  for (int i = 2; i <= n; i++) {
    auto it = lower_bound(pr.begin(), pr.end(), min({n / i, i, lw[i]}));
    int cnt = (it - pr.begin()) + !ip[min({n / i, i, lw[i]})];
    while (cnt--) {
      cout << i << " ";
    }
  }
}
