#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
constexpr int inf=1e9+7;
constexpr ll longinf=1LL<<60 ;
constexpr ll mod=1e9+7 ;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n;
    cin>>n;
    vector<int> ans(n+1);
    ans[1]=1;
    for(int i=1;i<=n;i++){
        for(int j=2*i;j<=n;j+=i){
            ans[j]=max(ans[i]+1,ans[j]);
        }
    }
    rep(i,n)cout<<ans[i+1]<<" \n"[i+1==n];
    return 0;
}
#include"bits/stdc++.h"
using namespace std;
typedef long long ll;

int main(){
    ll n;
    cin>>n;
    ll count=1;
    ll p=2;
    vector<ll>a(n);
    
    for(ll i=0;i<n;i++){
        a[i]=count;
        if(i+2==p){
            count++;
            p=p*2;
        }
    }

    for(ll i=0;i<n;i++){
        cout<<a[i]<<" ";
    }
}