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