
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n);i++)
#define Graph vector<vector<int>>;
#define iterG(next_v, G, v) for(auto next_v : G[v]
#define ALL(a)  (a).begin(),(a).end()
const int MOD = 1000000007;
const int MAX = 510000;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
ll getmaxlen(ll p){
    ll curlen = 0;
    for(ll i = 2; i * i <= p; i++){
        while(p % i == 0){
            curlen++;
            p /= i;
        }
       }
    if(p != 1){
        curlen++;
        
    }
    return curlen + 1;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    cout << 1;
    if(n == 1){
        cout << endl;
        return 0;
    }
    cout << " ";
    rep2(i, 2, n+1){
        cout<<  getmaxlen((ll)i) << " ";
    }
    cout << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _rrep(i,n) rrepi(i,0,n)
#define rrepi(i,a,b) for(int i=int(b)-1;i>=int(a);--i)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

void Main()
{
    int n;
    cin >> n;
    set<int> is;
    // rep(i, 1, n+1) is.insert(i);
    rep(i, 1, 100) is.insert(i);
    vector<set<int>> vs(n+1, is);
    for (int i = 1; i <= n; i++)
    {
        auto x = *vs[i].begin();
        for (int j = 2; i*j <= n; j++)
        {
            vs[i*j].erase(x);
        }
    }
    rep(i, 1, n+1) cout << *vs[i].begin() << " ";
    cout << endl;

    // rep(i, 1, n+1) if(vs[i].size() == 0) cout << "zero:" << i << endl;
}

int main(int argc, char **argv)
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    // int t; cin >> t; rep(i, t)
    Main();
    return 0;
}
