#include <bits/stdc++.h>
int ans[200005];
int main() {
  int n;
  std::cin >> n;
  int cnt = 1;
  for (int i = 2; i <= n; i++) {
    if (!ans[i]) ans[i] = cnt++;
    for (int j = i * 2; j <= n; j += i) {
      ans[j] = ans[i];
    }
    std::cout << ans[i];
    if (i != n) std::cout << " ";
  }
  std::cout << std::endl;
}
