#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
const int mod = 998244353;
int n, x;
bool vis[1 << 20];
int ans[maxn];
int main() {
  scanf("%d", &n);
  int cnt = 1;
  for (int i = 3; i <= n; i += 2) {
    if (ans[i]) continue;
    ++cnt;
    for (int j = i; j <= n; j += i) {
      ans[j] = cnt;
    }
  }
  for (int i = 2; i <= n; i++) {
    if (i % 2 == 0)
      cout << 1;
    else
      cout << ans[i];
    printf("%c", i == n ? '\n' : ' ');
  }
  return 0;
}
