#include <cstdlib>
#include<iostream>
#include<unordered_set> 
#include<vector>
#include<cstring>
#include<string>
#include<bitset>
#include<algorithm>
#include<cmath>
#include<numeric>
#include<iomanip>
using namespace std;
using ll = int64_t;
int main(){
    int n;
    cin >> n;
    vector<int> A(n+2);
    ll ans = 1;
    ll min_prime = 0; // 最小因数
    ll max_prime = 0;
    // A1 には1 A2には2を代入する
    A[0] = 1;
    for(ll i=2;i<=n;i++){
        min_prime = 0;
        for(ll j=1;j*j<=i;j++){
            if(i % j == 0 && j!=1) {
                min_prime = j;
                break;
            }
        }
        if(min_prime == 0)A[i-1] = 2;
        else{
            max_prime = i / min_prime;
            A[i-1] = A[max_prime-1] + 1;
        }
    }
    for(int i=0;i<n;i++){
        cout << A[i] << " ";
    }
    cout << endl;
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(void)
{
    ll N;
    cin >> N;
    ll num = 1;
    ll count = 1;
    ll precount = 1;
    for (ll i = 1; i <= N; i++)
    {
        if (precount > num)
        {
            precount = 1;
            count ++;
            num = num * 2;
        }
        if (i != N)
        {
            cout << count << " ";
        }
        else
        {
            cout << count << endl;
        }
        precount++;
    }
}