#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int t[N];
int main(void) {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (!t[i]) {
      t[i] = ++cnt;
      for (int j = i * 2; j <= n; j += i) t[j] = cnt;
    }
  }
  for (int i = 2; i <= n; i++) cout << t[i] << " ";
  cout << endl;
  return 0;
}
