#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ok = 1, k = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') ok = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    k = k * 10 + c - '0';
    c = getchar();
  }
  return ok * k;
}
int s[100005];
bool tot[100005];
int x = 0;
void work(int n) {
  for (int i = 2; i <= n; i++) {
    if (tot[i]) continue;
    for (int j = 2; j * j <= i; j++)
      if (i % j == 0) tot[i] = 1;
    if (!tot[i]) x++;
    s[i] = x;
    for (int j = 2; j * i <= n; j++)
      tot[j * i] = 1, s[j * i] = min(s[j * i], x);
  }
}
int main() {
  int n = read();
  memset(s, 0x3f, sizeof(s));
  work(n);
  for (int i = 2; i <= n; i++) {
    printf("%d ", s[i]);
  }
  return 0;
}
