#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, best, worst;
	cin >> n;
	deque<int> br1, br2, a, b, cpy1, cpy2;
	deque<int> raspored1, raspored2;
	for(int i = 1; i <= n; i++) br1.push_back(i);
	for(int i = n+1; i <= 2*n; i++) br2.push_back(i);
	cpy1 = br1; cpy2 = br2;
	if(n == 2){
        cout << "1 3" << endl;
        cout << "2 4";
        return 0;
    }
    else if(n == 3){
        cout << "2 6 3" << endl;
        cout << "5 1 4";
        return 0;
    }
    
	if(n % 2 == 0){
		for(int j = 0; j < (n-2)/2; j++){
			raspored1.push_back(br2.back());
			br2.pop_back();
			raspored1.push_back(br1.front());
			br1.pop_front();
		}
		for(int j = 0; j < (n-2)/2; j++){
			raspored2.push_back(br2.back());
			br2.pop_back();
			raspored2.push_back(br1.front());
			br1.pop_front();
		}
		// NIZ A
		a.push_back(br1.back());
		br1.pop_back();
		while(!raspored1.empty()){
			a.push_back(raspored1.front());
			raspored1.pop_front();
		}
		a.push_back(br2.back());
		br2.pop_back();
		// NIZ B
		b.push_back(br1.front());
		br1.pop_front();
		while(!raspored2.empty()){
			b.push_back(raspored2.front());
			raspored2.pop_front();
		}
		b.push_back(br2.front());
		br2.pop_front();
	} 
	else {
		int i = 0;
		br1 = cpy1; br2 = cpy2;
		best = br2.back();
		br2.pop_back();
		worst = br1.front();
		br1.pop_front();
		for(int j = 0; j < n/2; j++){
			a.push_back(br2.front());
			br2.pop_front();
			i++;
			if(i == (n/2)-1) break;
			a.push_back(br1.front());
			br1.pop_front();
			i++;
			if(i == (n/2)-1) break;
		}
		a.push_back(best);
		i++;
		for(int j = (n/2); j < n; j++){
			a.push_back(br1.front());
			br1.pop_front();
			i++;
			if(i == n-1) break;
			a.push_back(br2.front());
			br2.pop_front();
			i++;
			if(i == n-1) break;
		}
		i = 0;
		for(int j = 0; j < n/2; j++){
			b.push_back(br1.front());
			br1.pop_front();
			i++;
			if(i == (n/2)-1) break;
			b.push_back(br2.front());
			br2.pop_front();
			i++;
			if(i == (n/2)-1) break;
		}
		b.push_back(worst);
		i++;
		for(int j = (n/2); j < n; j++){
			b.push_back(br2.front());
			br2.pop_front();
			i++;
			if(i == n-1) break;
			b.push_back(br1.front());
			br1.pop_front();
			i++;
			if(i == n-1) break;
		}
	}
	while(!a.empty()){
		cout << a.front() << " ";
		a.pop_front();
	}
	cout << "\n";
	while(!b.empty()){
		cout << b.front() << " ";
		b.pop_front();
	}
	return 0;
}