#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  ;
  int n;
  cin >> n;
  int ans[100002] = {0};
  int pos = 1;
  for (int i = 2; i < n + 1; i++) {
    if (ans[i] == 0) {
      ans[i] = pos;
      for (int j = i; j <= n; j += i) ans[j] = pos;
      pos++;
    }
  }
  for (int i = 2; i < n + 1; i++) cout << ans[i] << " ";
  return 0;
}
