#include<cstdio>
int n;
int gao(int x)
{
	for (int j=10;j>=0&&x>n;--j)
		if (x&(1<<j)) x^=1<<j;
	return x?x:1;
}
int main()
{
	scanf("%d",&n);
	for (int i=1;i<=n;++i) printf("%d %d\n",gao(i<<1),gao(i<<1|1));
	return 0;
}
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

int main() {
  int n;
  scanf("%d", &n);

  for (int i = 0; i < n; i++) {
    int j0 = i * 2, j1 = i * 2 + 1;
    printf("%d %d\n", j0 % n + 1, j1 % n + 1);
  }
  return 0;
}