#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, y, x, z, h, max = 0, m, t, i, j, k = 9999999999, cnt = 1,
                           cnt1 = 0, sum = 0, flag = 0, flag1 = 0;
  cin >> n;
  long long a[n + 1];
  memset(a, 0, (n + 1) * (sizeof(a[0])));
  for (i = 2; i <= n; i++) {
    for (j = 1; j * i <= n; j++) {
      if (a[j * i] == 0) {
        a[j * i] = cnt;
        flag = 1;
      }
    }
    if (flag == 1) {
      cnt++;
    }
    flag = 0;
  }
  for (i = 2; i <= n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
