#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n; cin >> n;

	vector<int> a(n);
	vector<int> b(n);

	vector<int> a2;
	vector<int> b2;

	for (int i = 0; i < n; i++) {
		a[i] = 2 * i + 1;
		b[i] = 2 * i + 2;
	}

	if (n % 2 == 0) {
		for (int i = 0; i < n / 2; i++) {
			a2.push_back(a[i]);
			a2.push_back(a[n - i - 1]);
		}
		for (int i = 0; i < n / 2; i++) {
			b2.push_back(b[i]);
			b2.push_back(b[n - i - 1]);
		}
	}

	else {
		for (int i = 0; i < n / 2; i++) {
			a2.push_back(a[i]);
			a2.push_back(a[n - i - 1]);
		}
		a2.push_back(a[n / 2]);
		for (int i = 0; i < n / 2; i++) {
			b2.push_back(b[i]);
			b2.push_back(b[n - i - 1]);
		}
		b2.push_back(b[n / 2]);
	}

	int x = a2[1];
	int y = b2[1];

	a2[1] = y;
	b2[1] = x;


	for (int x : a2) cout << x << " ";
	cout << endl;
	for (int i = 0; i < n - 1; i += 2) {
		cout << b2[i + 1] << " " << b2[i] << " ";
	}
	if (n % 2 != 0) cout << b2[n - 1];

	return 0;
}