#include <algorithm>
#include <iostream>
using namespace std;

using ll = long long;

int a[100001];

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    fill(a + 1, a + n + 1, 2);
    for(int i = 2; i + i <= n; i++) {
        for(int j = i + i; j <= n; j += i) {
            a[j] += a[i] == a[j];
        }
    }
    cout << 1;
    for(int i = 2; i <= n; i++) {
        cout << ' ' << a[i];
    }
    return 0;
}

#include <cstdio>
#include <vector>
using namespace std;

int main (){
	bool notprime[100001] = {};
	int N;
	int v[100001] = {};
	vector<int> prime;
	scanf("%d", &N);
	notprime[1] = true;
	for (int i = 2; i <= N; i++)
		if (!notprime[i]){
			prime.push_back(i);
			for (long long j = (long long) i * i; j <= N; j += i)
				notprime[j] = true;
		}
	v[1] = 1;
	v[2] = v[3] = 2;
	for (int i = 4; i <= N; i++){
		int j = i;
		int index = 0;
		while (index < prime.size() && j > 1){
			if (prime[index] > j)
				break;
			else if (j % prime[index])
				index++;
			else {
				v[i] = max(v[i], v[i / prime[index]] + 1);
				while (j % prime[index] == 0)
					j /= prime[index];
			}
		}
	}
	for (int i = 1; i <= N; i++)
		printf("%d%c", v[i], i < N ? ' ' : '\n');
	return 0;
}