#include<bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cerr.tie(0);
	int n;
	cin >> n;
	deque<int> brojevi1, brojevi2, cpy1, cpy2;
	deque<int> a, b;
	/*for(int i = 1; i <= n; i++) brojevi1.push_back(i);
	for(int i = n+1; i <= 2*n; i++) brojevi2.push_back(i);
	cpy1 = brojevi1; cpy2 = brojevi2;
	if(n % 2 == 0){
		for(int i = 0; i < n/2; i++){
			a.push_back(brojevi2.front());
			brojevi2.pop_front();
			a.push_back(brojevi1.front());
			brojevi1.pop_front();
			if(a.size() == n) break;
			a.push_back(brojevi2.back());
			brojevi2.pop_back();
			a.push_back(brojevi1.front());
			brojevi1.pop_front();
			if(a.size() == n) break;
		}
		for(int i = 0; i < n/2; i++){
			b.push_back(brojevi2.front());
			brojevi2.pop_front();
			b.push_back(brojevi1.front());
			brojevi1.pop_front();
			if(b.size() == n) break;
			b.push_back(brojevi2.back());
			brojevi2.pop_back();
			b.push_back(brojevi1.front());
			brojevi1.pop_front();
			if(b.size() == n) break;
		}
	}
	else {
		for(int i = 0; i < (n/2); i++){
			a.
		}
		a.push_back(brojevi.back());
		brojevi.pop_back();
		for(int i = 0; i < (n/2); i++){
			b.push_back(brojevi.back());
			brojevi.pop_back();
			b.push_back(brojevi.front());
			brojevi.pop_front();
		}
		b.push_back(brojevi.back());
		brojevi.pop_back();
	}
	
	while(!a.empty()){
		cout << a.front() << " ";
		a.pop_front();
	}
	cout << "\n";
	while(!b.empty()){
		cout << b.front() << " ";
		b.pop_front();
	}*/
    if(n == 2){
        cout << "1 3" << endl;
        cout << "2 4";
    }
    else {
        cout << "6 1 4" << endl;
        cout << "2 5 3";
    }
    
	return 0;
}