#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[200001], n, i, j, nr = 1;
  bool ok;
  cin >> n;
  for (i = 2; i <= n; i++) {
    ok = 0;
    for (j = i; j <= n; j = j + i)
      if (a[j] == 0) {
        a[j] = nr;
        ok = 1;
      }
    nr = nr + ok;
  }
  for (i = 2; i <= n; i++) cout << a[i] << ' ';
  return 0;
}
