#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005] = {};
void read(int &x) {
  int f = 1;
  x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  x *= f;
}
int f = 0;
int main() {
  read(n);
  for (int i = 2; i <= n; i++) {
    if (a[i])
      continue;
    else {
      a[i] = ++f;
      int k = i * 2;
      while (k <= n) {
        a[k] = f;
        k += i;
      }
    }
  }
  for (int i = 2; i <= n; i++) printf("%d%c", a[i], " \n"[i == n]);
  return 0;
}
