import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

immutable long MOD = 10^^9 + 7;
immutable long INF = 1L << 59;

void main() {
    auto N = readln.chomp.to!int;
    auto ans = new int[](N+1);

    int tmp = 1;
    foreach (i; 2..N+1) {
        if (ans[i] != 0) continue;
        for (int j = i; j <= N; j += i) {
            ans[j] = tmp;
        }
        tmp += 1;
    }

    ans[2..$].map!(to!string).join(" ").writeln;
}