#include <bits/stdc++.h>
using namespace std;
class DebugStream {
} LOG;
template <typename T>
DebugStream &operator<<(DebugStream &s, const T &) {
  return s;
}
const int maxN = 1e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
int arr[maxN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int lv = 1;
  for (int i = 2; i <= n; i++) {
    bool alme = 0;
    for (int j = i; j <= n; j += i)
      if (!arr[j]) arr[j] = lv, alme = 1;
    if (alme) lv++;
  }
  for (int i = 2; i <= n; i++) cout << arr[i] << ' ';
  cout << '\n';
}
