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

using namespace std;

using ll = int;

void solve()
{
    ll n,i,sum,mx;
    cin >> n;
    n=2*n;
    vector<ll>a(n),res(n);
    for(i=0;i<n;i++)
    {
        a[i]=i+1;
    }
    mx=0;
    do
    {
        sum=0;
        for(i=0;i<n-1;i++)
        {
            sum+=abs(a[i]-a[i+1]);
            sum+=abs(a[i+n]-a[i+1+n]);
        }
        if(sum>mx)
        {
            for(i=0;i<n;i++)
            {
                res[i]=a[i];
            }
            mx=sum;

        }
    }while(next_permutation(a.begin(),a.end()));
    for(i=0;i<n/2;i++)
    {
        cout << res[i] << " ";
    }
    cout << endl;
    for(i=0;i<n/2;i++)
    {
        cout << res[i+n/2] << " ";
    }
    cout << endl;

}



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