#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int vi[n + 1];
  memset(vi, 0, sizeof(vi));
  int cu = 1;
  for (int i = 2; i <= n; i++) {
    if (vi[i]) continue;
    vi[i] = cu;
    for (int j = i + i; j <= n; j += i) vi[j] = cu;
    cu++;
  }
  for (int i = 2; i <= n; i++) {
    cout << vi[i] << " ";
  }
  return 0;
}
