#include <bits/stdc++.h>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int n, n2, x, z=0;
    cin>>n;
    vector <int> veki1 = {0};
    vector <int> veki2 = {0};

    for(int i=1; i<=n-2; i++){
        if(i==n-2 and n%2==1){
            veki1.push_back(2*n-i+1);
            veki2.push_back(i);
        }
        else if(i%2==1){
            veki1.push_back(2*n-i+1);
            veki1.push_back(i);
        }
        else if(i%2==0){
            veki2.push_back(i);
            veki2.push_back(2*n-i+1);
        }

    }
    if(veki1[1]>veki2[1]){
        veki1[0]=n-1;
        veki2[0]=n;

    }
    else{
        veki2[0]=n-1;
        veki1[0]=n;

    }
    if(veki1[n-2]>veki2[n-2]){
        veki1.push_back(n+1);
        veki2.push_back(n+2);
    }
    else{
        veki2.push_back(n+1);
        veki1.push_back(n+2);
    }

    if((veki1[1] > veki1[n-2] and veki1[0] > veki1[n-1]) or (veki1[1] < veki1[n-2] and veki1[0] < veki1[n-1])){
        int a=veki1[0];
        veki1[0]=veki1[n-1];
        veki1[n-1]=a;
    }
    if((veki2[1] > veki2[n-2] and veki2[0] > veki2[n-1]) or (veki2[1] < veki2[n-2] and veki2[0] < veki2[n-1])){
        int a=veki2[0];
        veki2[0]=veki2[n-1];
        veki2[n-1]=a;
}
//    int i=0;
    for(int el: veki1){
        cout<<el<<" ";
//        z+=abs(i-el);
//        i=el;
        }

    cout<<endl;
//    i=0;
    for(int el: veki2){
        cout<<el<<" ";
//        z+=abs(i-el);
//        i=el;
        }
    cout<<endl;

//    cout<<z<<endl;
}