#include <bits/stdc++.h>
#define endl "\n"

using namespace std;

using ll = long long;

void solve()
{
    ll n,nm,nv,i;
    cin >> n;
    vector<ll>a(n),b(n);
    if(n%2==0)
    {
        vector<ll>a(n),b(n);
        a[0]=n;
        a[n-1]=n+2;
        b[0]=n-1;
        b[n-1]=n+1;
        nm=1;
        nv=2*n;
        for(i=1;i<n-1;i++)
        {
            if(i%2)
            {
                a[i]=nv;
                nv--;
            }
            else
            {
                a[i]=nm;
                nm++;
            }
        }
        for(i=1;i<n-1;i++)
        {
            if(i%2)
            {
                b[i]=nv;
                nv--;
            }
            else
            {
                b[i]=nm;
                nm++;
            }
        }
        for(auto &x:a)
        {
            cout << x << " ";
        }
        cout << endl;
        for(auto &x:b)
        {
            cout << x << " ";
        }
        return;
    }
    nm=2;
    nv=2*n-1;
    a[n/2]=nv+1;
    b[n/2]=nm-1;
    for(i=1;i<=n/2;i++)
    {
        if(i%2==1)
        {
            a[n/2+i]=nm;
            nm++;

            a[n/2-i]=nm;
            nm++;
            b[n/2+i]=nv;
            nv--;
            b[n/2-i]=nv;
            nv--;
        }
        else
        {
            a[n/2-i]=nv;
            nv--;
            a[n/2+i]=nv;
            nv--;
            b[n/2-i]=nm;
            nm++;
            b[n/2+i]=nm;
            nm++;
        }

    }
    for(auto &x:a)
        {
            cout << x << " ";
        }
        cout << endl;
        for(auto &x:b)
        {
            cout << x << " ";
        }
        return;
}



int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll t=1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
}