#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,l=0, r,mx=0,tr;
    cin>>n;
    vector<int>a(n),b(n);
    tr=n;
    for(int i=0;i<n;i++){
        if(i%2==0)a[i]=tr;
        else b[i]=tr;
        tr=(tr+1)%n;
    }
    tr=n+1;
    for(int i=0;i<n;i++){
        if(i%2==0)b[i]=tr;
        else a[i]=tr;
        if(tr==n+1)tr=2*n;
        else tr--;
    }
    for(auto x:a)cout<<x<<" ";
    cout<<endl;
    for(auto x:b)cout<<x<<" ";
    cout<<endl;
    return 0;
}