#include <bits/stdc++.h>

int n;

int main(){
	std::scanf("%d", &n);
	for(int i = 1; i <= n; ++i)
		std::printf("%d %d\n", i * 2 % n + 1, (i * 2 - 1) % n + 1);
}
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define MTP make_tuple
typedef long long int ll;

constexpr int kN = int(1E3 + 10), kInf = int(1E9 + 10);

int a[kN], b[kN];

int main() {
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) a[i] = ((i - 1) << 1) % n + 1;
	for (int i = 1; i <= n; i++) b[i] = ((i - 1) << 1 | 1) % n + 1;

	for (int i = 1; i <= n; i++) printf("%d %d\n", a[i], b[i]);
}
