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