#include <bits/stdc++.h>
using namespace std;
void parseArray(long long* A, long long n) {
  for (long long K = 0; K < n; K++) {
    cin >> A[K];
  }
}
long long modInverse(long long a, long long b) {
  return 1 < a ? b - modInverse(b % a, a) * b / a : 1;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long double dist(long long x, long long y, long long a, long long b) {
  return sqrt((x - a) * (x - a) + (y - b) * (y - b));
}
void debug(long long* a, long long n) {
  for (int k = 0; k < n; k++) {
    cout << a[k] << " ";
  }
  cerr << "\n";
}
long long mod = 1000000007;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long ans[n + 1];
  memset(ans, 0, sizeof ans);
  long long id = 1;
  for (int k = 2; k <= n; k++) {
    if (ans[k] == 0) {
      for (int j = k; j <= n; j += k) {
        ans[j] = id;
      }
      id++;
    }
  }
  for (int k = 2; k <= n; k++) {
    cout << ans[k] << " ";
  }
  cout << endl;
  return 0;
}
