#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, cnt = 1;
  cin >> n;
  vector<int> nums(n + 1), ans(n + 1), primes;
  for (int i = 0; i <= n; ++i) nums[i] = i;
  for (int i = 2; i <= n; ++i)
    if (nums[i] == i) {
      for (long long j = 1ll * i * i; j <= n; j += i)
        if (nums[j] == j) nums[j] = i;
      ++cnt;
      ans[cnt] = 1;
      primes.push_back(i);
    }
  for (int i = 2; i <= n && cnt < n; ++i) {
    for (int j : primes) {
      if (j > nums[i]) break;
      long long gh = 1ll * i * j;
      if (gh > n) break;
      ++cnt;
      ans[cnt] = i;
    }
  }
  for (int i = 2; i <= n; ++i) cout << ans[i] << " ";
  return 0;
}
