#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

template<class T> void read(T &x){
	int f=0; x=0; char ch=getchar();
	for(;!isdigit(ch);ch=getchar()) f|=(ch=='-');
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	if(f) x=-x;
}

int n;

int main(){
	read(n);
	REP(i,n){
		int A=i*2%n;
		int B=(i*2+1)%n;
		printf("%d %d\n",A+1,B+1);
	}	

	return 0;
}
#include <bits/stdc++.h>

int n;

inline int highbit(int a){
	for(int i = 10; ~i; --i)
		if(a & (1 << i))
			return 1 << i;
	return 0;
}

int main(){
	std::scanf("%d", &n);
	for(int i = 1; i <= n; ++i){
		int a = i * 2, b = i * 2 + 1;
		while(a > n) a -= highbit(a);
		while(b > n) b -= highbit(b);
		if(!a) a = 1;
		if(!b) b = 1;
		std::printf("%d %d\n", a, b);
	}
}