#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <iomanip>
#include <functional>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i,n) for (ll i = 0; i < (ll)(n); i++)
#define REP(i,n) for (ll i = 1; i <= (ll)(n); i++)
#define all(v) v.begin(), v.end()
#define fcout cout<<fixed<<setprecision(15)
#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078160628620899
const ll MOD = 1000000007;
const ll INF = 1000000000000000000;
const ll NIL = -1;

ll N;
vector<ll> prime;

bool isPrime(ll N) {
	ll T = sqrt(N);
	for (int i = 2; i <= T; i++) {
		if (N % i == 0) return false;
	}
	return true;
}

int main() {
	cin >> N;
	ll p = 0;
	for (int i = 2; i <= N; i++) {
		if (isPrime(i)) {
			prime.push_back(i);
		}
	}
	REP(i, N) {
		if (i > 1) cout << " ";
		ll Z = 1;
		ll k = 0;
		ll U = i;
		while (U > 1) {
			if (U % prime[k] == 0) {
				U /= prime[k];
				Z++;
			}
			else k++;
		}
		cout << Z;
	}
	cout << endl;
	return 0;
}
#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>

#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)

using ll = long long;
using ld = long double;
using ull = unsigned long long;

using namespace std;


/*
ll pw(ll a, ll b) {
	ll ans = 1; while (b) {
		while (!(b & 1)) b >>= 1, a = (a * a) % MOD;
		ans = (ans * a) % MOD, --b;
	} return ans;
}
*/

int main() {
	ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cout.setf(ios::fixed), cout.precision(20);
	int n;
	cin >> n;
	if (n == 1) {
		cout << 1 << " " << 1 << "\n";
		return 0;
	}
	int k = 0;
	while ((1 << k) < n) {
		++k;
	}
	int mod = (1 << k);
	for (int i = 0; i < n; ++i) {
		int l = (i * 2) % mod;
		int r = (i * 2 + 1) % mod;
		if (l >= n) {
			l -= (1 << (k - 1));
		}
		if (r >= n) {
			r -= (1 << (k - 1));
		}
		cout << l + 1 << " " << r + 1 << "\n";
	}
	return 0;
}


