#include<bits/stdc++.h>
#define rep(i,a,b) for(ll i=(a);i<=(b);i++)
#define per(i,a,b) for(ll i=(a);i>=(b);i--)
#define lc(x) (x<<1)
#define rc(x) (lc(x)|1)
#define lowbit(x) (x&-x)
#define Max(a,b) (a>b?a:b)
#define Min(a,b) (a<b?a:b)
#define next Cry_For_theMoon
#define il inline
#define pb(x) push_back(x)
#define mapit map<int,int>::iterator
#define vit vector<int>::iterator
#define mp(x,y) make_pair(x,y)
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef double db;
using namespace std;
const int MAXN=1e5+10;
int n,size[MAXN],ans;
int color[MAXN];
vector<int>v[MAXN];
int main(){
	cin>>n;
	rep(i,1,n){
		sort(v[i].begin(),v[i].end());
		color[i]=1;int pre=-1;
		for(vit it=v[i].begin();it!=v[i].end();it++){
			if(*it==pre)continue;
			pre=*it;
			if(color[i]==*it)color[i]++;
			else break;
		}
		rep(j,2,n){
			if(j*i>n)break;
			v[j*i].pb(color[i]);
		}
	} 
	rep(i,1,n)printf("%d ",color[i]);
	return 0;
}

#include <bits/stdc++.h>

using namespace std;
 
typedef long long ll;
typedef long double ld;
 
typedef pair<ll, ll> pt;
 
#define MOD 1000000007

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;

	vector<int> ans(N, 2);
	ans[0] = 1;

	for(int i = 2; i <= N; i++) {
		for(int j = 2; i * j <= N; j++) {
			ans[i * j - 1] = ans[i - 1] + 1;
		}
	}

	for(int i = 0; i < N; i++) cout << ans[i] << " ";
	cout << endl;
}