#include <bits/stdc++.h>
using namespace std;
const int md = 1e8;
const int MAX = 1e5 + 5;
int main() {
  int arr[MAX];
  for (int i = 0; i < MAX; i++) arr[i] = -1;
  long long int cnt = 1;
  for (int i = 2; i * i <= MAX; i++) {
    if (arr[i] == -1) {
      arr[i] = cnt;
      for (int j = i * i; j < MAX; j += i) {
        arr[j] = cnt;
      }
      ++cnt;
    }
  }
  long long int n;
  cin >> n;
  cout << "\n";
  for (int i = 2; i < n + 1; i++) {
    if (arr[i] == -1) arr[i] = cnt++;
    cout << arr[i] << "\n";
  }
  return 0;
}
