#include <iostream>
#include <algorithm>
#include <vector>
#define flush fflush(stdout)
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
const int mod1 = (int)1e9 + 7, mod2 = (int)998244353;
const int INF = (int)1e9;
const int di[8] = {1, 0, -1, 0, 1, 1, -1, -1}, dj[8] = {0, 1, 0, -1, -1, 1, -1, 1};

#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, a, b) for (i = a; i < b; i++)


int main(void){
    int i, j;
    int n, a[100003] = {};

    cin >> n;

    rep1(i, 1, n + 1){
        a[i] = 1;
    }

    rep1(i, 1, n + 1){
        if (a[i] == 0){
            a[i] = 1;
        }
        j = i * 2;
        while (j <= n){
            if (a[j] == a[i]){
                a[j] = a[i] + 1;
            }
            j += i;
        }
    }

    rep1(i, 1, n + 1){
        cout << a[i] << ((i == n)? endl : ' ');
    }

    return (0);
}
#include<bits/stdc++.h>
using namespace std;
// 素因数分解
template <typename T>
map<T, T> prime_factor(T n) {
    map<T, T> ret;
    for (T i = 2; i * i <= n; i++) {
        T tmp = 0;
        while (n % i == 0) {
            tmp++;
            n /= i;
        }
        ret[i] = tmp;
    }
    if (n != 1) ret[n] = 1;
    return ret;
}
template <typename T>
T divisor_num(T N) {
    map<T, T> pf = prime_factor(N);
    T ret = 1;
    for (auto p : pf) {
        ret += p.second;
    }
    return ret;
}
int main(){
  int n;
  cin>>n;
  int count=0;
  cout<<1<<" ";
  for (int i=2;i<=n;i++){
    cout<<divisor_num(i)<<" ";
  }
}