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