#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int main() {
  int n;
  cin >> n;
  int j = 1;
  for (int i = 2; i <= n; i++) {
    if (arr[i] == 0) {
      int k = 1;
      while (i * k <= n + 1) {
        arr[i * k] = j;
        k++;
      }
      j++;
    }
  }
  for (int i = 2; i <= n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
