#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const long long N = 1e5 + 4;
long long spf[N];
void solve() {
  long long n;
  cin >> n;
  long long idx = 0;
  for (long long i = 2; i < N; ++i) {
    if (!spf[i]) spf[i] = ++idx;
    for (long long j = 2 * i; j < N; j += i) {
      spf[j] = spf[i];
    }
  }
  for (long long i = 2; i < n + 1; ++i) {
    cout << spf[i] << ' ';
  }
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
