#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int arr[100001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, curr;
  cin >> n;
  curr = 1;
  for (int i = 0; i < (100001); ++i) arr[i] = 0;
  for (int i = (2); i < (n + 1); i++) {
    int j = i;
    int count = 0;
    while (j <= n) {
      if (arr[j] == 0) {
        count++;
        arr[j] = curr;
      }
      j += i;
    }
    if (count > 0) curr++;
  }
  for (int i = (2); i < (n + 1); i++) cout << arr[i] << " ";
  return 0;
}
