#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 = 2; i < n; i += 2) {
        a[i] = i / 2;
    }

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

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

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

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

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


    return 0;
}