#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int arr[100010];
int main() {
  int n;
  cin >> n;
  int ps = 2;
  for (int i = 3; i <= n; i += 2) {
    if (arr[i]) continue;
    for (int j = 1; j * i <= n; j += 2) {
      arr[j * i] = ps;
    }
    ps++;
  }
  for (int i = 2; i <= n; i++) {
    if (arr[i])
      cout << arr[i];
    else
      cout << "1";
    cout << " ";
  }
  return 0;
}
