#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int n;
    cin>>n;

    vector<int> a(n), b(n);
    a[0] = 1;
    b[0] = 2;
    a[1] = 2*n-1;
    b[1] = 2*n;
    for (int i = 2; i<n; i++) {
        a[i] = a[i-2] + (i%2 ? -2 : 2);
        b[i] = b[i-2] + (i%2 ? -2 : 2);

    }
    sort(a.begin(), a.end());
    sort(b.begin(), b.end());


    for (int x : a) {
        cout<<x<<' ';
    }
    cout<<'\n';
    for (int x : b) {
        cout<<x<<' ';
    }


}