#include<cstdio>
#define N 100002
int n, pri[N], bz[N], ans[N], tot;
int main(){
	scanf("%d", &n);
	for (int i = 2; i <= n; i ++){
		if (!bz[i]){
			pri[++ tot] = i;
			ans[i] = 1;
		}
		for (int j = 1; j <= tot && i * pri[j] <= n; j ++){
			bz[i * pri[j]] = 1;
			ans[i * pri[j]] = ans[i] + 1;
			if (i % pri[j] == 0) break;
		}
	}
	for (int i = 1; i <= n; i ++) printf("%d ", ans[i] + 1);
}
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

int main() {
	/*freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);*/
	int n;
	cin >> n;
	int curr = 1;
	for (int i = 1; i <= n; i++) {
		if (i == (1 << curr)) {
			curr++;
		}
		cout << curr << ' ';
	}
}