#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define endl "\n"
#define mod 1000000007
#define vec vector <ll>
#define vecp vector <pair<ll,ll>>
#define mp make_pair
#define A first
#define B second
#define PattSee ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define all(v) v.begin(),v.end()
#define mpl map<ll,ll>
#define umpl unordered_map<ll,ll>
#define rep(i,a,b) for(i=a; i<b; i++)
using namespace std;


void solve()
{
    ll i,j,flag=0;
    // Write your code here
    ll n;
    cin>>n;
    vec v(n+1,2);
    cout<<"1 ";
    for(i=2; i<=n; i++)
    {
    	for(j=2; i*j<=n; j++)
    		v[i*j]=v[i]+1;
    	cout<<v[i]<<" ";
    }
}

int main()  
{
    PattSee
    ll t=1;
    //cin>>t;
    while(t--)
    {
    	solve();
    }
    return 0;
}

/*
if lcm of all is not last then +1
els +(no. of non prime)

3 + no. of non-prime divisors

5*3*7 = 21*5 = 105

105
33 35 37
17 19 21 23 25
11 13 15 17 19 21 23

48
23 25
9 11 13 15
*/




#include<bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;

    int dp[n + 1];
    dp[1] = 1;
    for(int i = 2;i <= n;++i) {
        int max_div = 1;
        for(int d = 2;d <= sqrt(i);++d) {
            if(i % d == 0) {
                max_div = max(max_div, d);
                max_div = max(max_div, i / d);
            }
        }
        dp[i] = dp[max_div] + 1;
    }

    for(int i = 1;i <= n;++i) {
        cout << dp[i] << " ";
    }
    return 0;
}