#include <bits/stdc++.h>

#define N 500005

#define pb push_back
#define mk make_pair
#define fi first
#define se second

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i)
	{
		int s = 0, x = i;
		for (int j = 2; j * j <= i; ++j)
		{
			while (x % j == 0) ++s, x /= j;
		}
		if (x > 1) ++s;
		printf("%d ", s + 1); 
	}
}
// C++(GCC 9.2.1)
#include <bits/stdc++.h>
using namespace std;
#define repex(i, a, b, c) for(int i = a; i < b; i += c)
#define repx(i, a, b) repex(i, a, b, 1)
#define rep(i, n) repx(i, 0, n)
#define repr(i, a, b) for(int i = a; i >= b; i--)
int ans[101010];

int main(){
    
    // 1. 入力情報.
    int N;
    scanf("%d", &N);
    
    // 2. i の 小さい順に, 数列を更新.
    rep(i, 101010) ans[i] = 1;
    repx(i, 1, N + 1) repex(j, i * 2, N + 1, i) if(ans[i] == ans[j]) ans[j]++;
    
    // 3. 出力.
    repx(i, 1, N + 1){
        printf("%d", ans[i]);
        printf("%s", (i < N) ? " " : "\n");
    }
    return 0;
    
}