#include <bits/stdc++.h>
using namespace std;
int arr[100050];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int x = 0;
  for (int i = 2; i <= n; i++) {
    if (!arr[i]) {
      x++;
      for (int j = 1; i * j <= n; j++) {
        arr[i * j] = x;
      }
    }
  }
  for (int i = 2; i <= n; i++) {
    if (i < n) {
      cout << arr[i] << " ";
    } else {
      cout << arr[i] << endl;
    }
  }
}
