#include <bits/stdc++.h>
using namespace std;
const int mn = 1e5 + 100;
const int inf = 1e9;
const int mod = 1e9;
int g[mn];
void go(int i, int t) {
  for (int j = i; j < mn; j += i) {
    g[j] = t;
  }
  return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << setprecision(30);
  int n, t = 1;
  for (int i = 2; i < mn; i++) {
    if (g[i] == 0) {
      go(i, t);
      t++;
    }
  }
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cout << g[i] << " ";
  }
  cout << "\n";
  return 0;
}
