#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    if (n == 0) {
        cout << 0;
        return 0;
    }
    int isEven = 0;
    if (n % 2 == 0) isEven = 1;

    int counter = 0, l = -1, r = 2 * n + 2;

    vector<int> niz;
    for (int i = 1; i <= 2 * n; i++) {
        l += 2;
        r -= 2;

        if (l < r && counter != n) {
            niz.push_back(l);
            niz.push_back(r);
            counter++;
        } else {
            l = 0;
            r = 2 * n + 1;
        }
    }

    if (n > 3) {
        if (isEven == 1) {
            swap(niz[0], niz[n - 2]);
            swap(niz[n], niz[n * 2 - 2]);
        } else {
            swap(niz[0], niz[n - 3]);
            swap(niz[0], niz[n * 2 - 2]);
        }
    }

    if (n == 3) {
        swap(niz[0], niz[n + 1]);
    }

    for (int i = 0; i < n; i++) {
        cout << niz[i] << " ";
    }
    cout << endl;

    for (int i = n; i < 2 * n; i++) {
        cout << niz[i] << " ";
    }
}