#include <bits/stdc++.h>
using namespace std;
long long ans[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, i, j, cnt = 1;
  cin >> n;
  for (i = 2; i <= n; i++) {
    if (ans[i] == 0) {
      for (j = i; j <= n; j += i) ans[j] = cnt;
      cnt++;
    }
  }
  for (i = 2; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
