#include <bits/stdc++.h>
using namespace std;
int n;
int a[100067], b[100067];
void ispis(){
    for(int i = 1; i<=n; i++) cout << a[i] << " ";
    cout << endl;
    for(int i = 1; i<=n; i++) cout << b[i] << " ";
}

void fun(){
    bool bo = true;
    int br = 1;
    for(int i = n/2+1; i>=1; i--){
        if(bo){
        b[i] = br;
        bo = false;
        }
        else{
            a[i] = br;
            bo = true;
        }
        if(br==1) br++;
        else br+=2;
    }
    br = 1;
    bo = true;
    for(int i = n/2+1; i<=n; i++){
        if(bo){
        b[i] = br;
        bo = false;
        }
        else{
            a[i] = br;
            bo = true;
        }
        br+=2;
    }
    br = 2*n;
    bo = true;
    for(int i = n/2+1; i>=1; i--){
        if(bo){
        a[i] = br;
        bo = false;
        }
        else{
            b[i] = br;
            bo = true;
        }
        if(br==2*n) br--;
        else br-=2;
    }
    br = 2*n;
    bo = true;
    for(int i = n/2+1; i<=n; i++){
        if(bo){
        a[i] = br;
        bo = false;
        }
        else{
            b[i] = br;
            bo = true;
        }
        br-=2;
    }
    ispis();
}

int main(){
    cin >> n;
    fun();
    return 0;
}