#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

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


    for (int i = 1; i < n; i += 2) {
        a[i] = 2 * n - i / 2;
    }
    for (int i = 4; i < n; i += 2) {
        a[i] = 1 + i / 2;
    }

    a[0] = 2;
    if (n > 2) a[2] = 1;

    b[0] = a[n - 1] + 2;
    if (n % 2 == 0) b[0] = a[n - 2] + 2;

    if (n > 2) b[2] = b[0] - 1;

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

    for (auto i : a) cout << i << " ";
    cout << endl;

    for (auto i : b) cout << i << " ";
    cout << endl;


    return 0;
}