#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 + 50;
const int inf = 1e9;
inline int lowbit(const int & x) { return x & (-x);}
int n, rt;
int ls[maxn], rs[maxn];
int a[maxn][maxn];
void check()
{
	for(int i = 1; i <= n; ++i) for(int j = 1; j <= n; ++j) a[i][j] = (i == j) ? 0 : inf;
	for(int i = 1; i <= n; ++i) a[i][ls[i]] = a[i][rs[i]] = 1;
	for(int k = 1; k <= n; ++k)
		for(int i = 1; i <= n; ++i)
			for(int j = 1; j <= n; ++j)
				a[i][j] = min(a[i][k] + a[k][j], a[i][j]);
	for(int i = 1; i <= n; ++i)
	{
		for(int j = 1; j <= n; ++j)
			printf("%d ", a[i][j]);
		puts("");
	}
}
int main()
{
	scanf("%d", &n);
	for(int i = 0; i < n; ++i)
	{
		ls[i] = (i << 1) % n + 1;
		rs[i] = (i << 1 | 1) % n + 1;
		printf("%d %d\n", ls[i], rs[i]);
	}
	//check();
	return 0;
} 
		
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		printf("%d %d\n",(i*2-1)%n+1,(i*2)%n+1);
	
	return 0;
}