#include <bits/stdc++.h>
#include <ctime>
#include <cstdlib>

#define int long long
#define ii pair<int, int>
#define pb push_back
#define mp make_pair
#define MOD 1000000009
#define E13 10000000000000
#define DUMP(a) \
    do { std::cout << "[" << #a " = " << (a) << "]" <<  std::endl; } while(false)
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define edge pair<int, pair<int, int> > 
#define REP0(i, n) for (int i=0; i<n; ++i)
#define REP1(i, n) for (int i=1; i<=n; ++i)
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
using namespace std;
 
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    os << "[ ";
    for(auto v : V) os << v << " ";
    return os << "]";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << "(" << P.first << "," << P.second << ")";
}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.F<<":"<<m.S<<") ";
    return os<<"}";
}


signed main(){
    int n; cin >> n;
    vector<int> value(n+1, 1);
    for (int i=1; i<=n; ++i){
        for (int j=2*i; j<=n; j+=i){
            value[j] = max(value[j], value[i]+1);
        }
    }
    for (int i=1; i<=n; ++i){
        cout << value[i] << " ";

    }
    cout << endl;
    return 0;
}
#include<bits/stdc++.h>
#define fastIO  std::ios::sync_with_stdio(false);cin.tie(NULL)

using namespace std;
#define F first
#define S second

const int N = 100001;
vector<int> primes;
int isprime[N] = {0};
void sieve()
{
    isprime[0] = 1;
    isprime[1] = 1;
    primes.push_back(2);
    for(int i=4 ; i<N ; i+=2)
        isprime[i] = 1;

    for(int i=3 ; i*i<N ; i+=2)
    {
        if(isprime[i]==0)
        {
            primes.push_back(i);
            for(int j=i*i ; j<N ; j+=i)
                isprime[j] = 1;
        }
    }
}
vector<pair<int , int> > retpf(int x)
{
    vector<pair<int , int> > ans;
    int cnt = 0;
    for(int i=0 ; i<primes.size() && (primes[i]*primes[i]<=x) ; i++)
    {
        if(x%primes[i]==0)
        {
            cnt = 0;
            while(x%primes[i]==0)
            {
                cnt++;
                x/=primes[i];
            }
            ans.push_back(make_pair(primes[i] , cnt));
        }
        if(isprime[x]==0)
        {
            ans.push_back(make_pair(x , 1));
            break;
        }
    }
    return ans;
}

int main()
{
fastIO;
sieve();

int n;
cin>>n;
vector<int> dp(n+1 , 1);
for(int i=1 ; i<=n ; i++)
{
    if(isprime[i]==0)
        dp[i] = 2;
    else
    {
        int ctr = 0;
        vector<pair<int , int> > pf = retpf(i);
        for(int j=0 ; j<pf.size() ; j++)
        {
            if(pf[j].F!=1 && pf[j].F!=i)
            {
                ctr += pf[j].S;
            }
        }
        dp[i] = ctr+1;
    }
}
for(int i=1 ; i<=n ; i++)
    cout<<dp[i]<<" ";
return 0;
}
