#include <bits/stdc++.h>
using namespace std;
int prime[100010];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (!prime[i]) {
      cnt++;
      for (int j = i; j <= n; j += i) prime[j] = cnt;
    }
  }
  for (int i = 2; i <= n; i++) cout << prime[i] << ' ';
  cout << '\n';
  return 0;
}
