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

using namespace std;

using ll = long long;

void solve()
{
    ll n,nm,nv,i;
    cin >> 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=1;
    nv=2*n;
    for(i=0;i<n;i++)
    {
        if(i%2)
        {
            cout << nm << " ";
            nm++;
        }
        else
        {
            cout << nv << " ";
            nv--;
        }
    }
    cout << endl;
    for(i=0;i<n;i++)
    {
        if(i%2)
        {
            cout << nm << " ";
            nm++;
        }
        else
        {
            cout << nv << " ";
            nv--;
        }
    }
}



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