#include<iostream>
using namespace std;
int N;
main()
{
	cin>>N;
	for(int i=0;i<N;i++)
	{
		cout<<i/2+1<<" "<<(i+N)/2+1<<endl;
	}
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for (int i = 0; i < n; i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
template<class T> ostream& operator << (ostream &s, vector<T> &P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
using P  = pair<int,int>;

void slv(){
    int n;cin>>n;
    vector<vector<int>> divisor(n + 1,vector<int>{});
    rep1(i,n){
        for (int j = i; j <= n; j += i){divisor[j].push_back(i);}
    }
    vector<int> color(n);
    vector<P> A;
    rep1(i,n){int l = divisor[i].size();A.push_back(P{l,i});}
    sort(A.begin(),A.end());
    for (auto [dcnt,v] : A){
        set<int> S;
        for (auto div : divisor[v]) S.insert(color[div - 1]);
        int m = *S.rbegin();
        m++;
        color[v - 1] = m;
    }
    cout << color << endl;
    return;
}

signed main(){
    int t;t = 1;
    rep(i,t){slv();}
    return 0;
}