#include <cstdio>
#include <cstring>
#include <algorithm>
#define N 100010

using namespace std;

int n, a[N];

int main(){
//	freopen("funny.in", "r", stdin);
	scanf("%d", &n);
	a[1]=1;
	for (int i=1; i<=n; i++)
		for (int j=2; j<=n/i; j++)
			a[i*j]=max(a[i*j], a[i]+1);
	for (int i=1; i<=n; i++) printf("%d ", a[i]);
	
	return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
    ll n;
    cin >> n;
    vector<vector<int>> seen(n + 1, vector<int>(500, 0));
    vector<ll> ans;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j < 500; j++) {
            if (seen[i][j] == 0) {
                ans.push_back(j);
                break;
            }
        }
        for (int j = i; j <= n; j += i) {
            seen[j][*ans.rbegin()] = 1;
        }
    }

    rep(i, n) cout << ans[i] << " ";
    cout << endl;
}