#include <bits/stdc++.h>
using namespace std;
int N;
int id[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  int mx = 1;
  for (int i = 2; i <= N; i++) {
    if (!id[i]) {
      id[i] = mx;
      for (int j = 2 * i; j <= N; j += i) id[j] = mx;
      mx++;
    }
  }
  for (int i = 2; i <= N; i++) cout << id[i] << ' ';
  cout << '\n';
  return 0;
}
