#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, long long> m;
const long long N = 1e5 + 10;
int n, t;
long long a[100010];
int prime[N], check[N], sum[N], cnt;
inline void init(int n) {
  int i, j;
  int cut = 0;
  for (i = 2; i <= n; i++) {
    if (check[i] == 0) prime[++cnt] = i, sum[i] = cnt;
    for (j = 1; j <= cnt && prime[j] * i <= n + 1; j++) {
      check[prime[j] * i] = 1;
      sum[prime[j] * i] = min(sum[i], sum[prime[j]]);
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= n; i++) {
    sum[i] = N + 10;
    if (i % 2 == 0) {
      sum[i] = 1;
    }
  }
  init(n);
  for (int i = 2; i < n; i++) {
    cout << sum[i] << ' ';
  }
  cout << sum[n] << endl;
  return 0;
}
