#include<iostream>
using namespace std;
int n;
int a(int m){
	if(m%n==0)return n;
	else return m%n;
}
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)cout<<a(2*i)<<" "<<a(2*i+1)<<endl;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int MAXN = 1e3 + 5;

#define bbit(i) (1<<(i))
#define bdig(x,i) (((x)>>(i))&1)

inline int get_lb(int x)
{
	int lb = 0;
	while(x>>lb) ++lb;
	return lb-1;
}

int n;
inline int tidy(int x){ while(x>n) x ^= bbit(get_lb(x)); return max(x, 1);}

int main(void)
{
	scanf("%d",&n);
	
	for(int i=1; i<=n; ++i)
		printf("%d %d\n",tidy(i<<1),tidy(i<<1|1));
	return 0;
}