#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;cin>>n;
    vector<int> res(2 * n);

    int r1 = n - 1, r2 = n;
    int l = r1 - 1, r = r2 + 1;
    int hi = 2 * n, lo = 1;

    res[r1] = r1 + 1;
    res[r2] = r2 + 1;

    while (l >= 0){
        res[r] = hi;
        res[l] = lo;

        if (hi > lo)
            --hi, ++lo;
        else
            ++hi, --lo;

        swap(hi, lo);

        --l, ++r;
    }

    for (int i = 0; i < n; ++i)
        cout<<res[i]<<' ';

    cout<<endl;

    for (int i = 0; i < n; ++i)
        cout<<res[i + n]<<' ';


    return 0;
}