#include <iostream>
#include <bits/stdc++.h>

using namespace std;

#define endl "\n"
#define ll long long

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(NULL);
    int n;
    cin >> n;


    if(n%2==0){

        cout << 2*(n/2)+1 << " ";
        int mali=1, veliki=2*(n/2)+3;
        int ctr=1;
        while(ctr<n){
            if(ctr==n-1){
                cout << n-1 << " ";
            }
            else{
                if(ctr%2){
                    cout << mali << " ";
                    mali++;
                }
                else{
                    cout << veliki << " ";
                    veliki++;
                }
            }
            ctr++;
        }
        cout << endl;
        cout << 2*(n/2)+2 << " ";
        ctr=1;
        while(ctr<n){
            if(ctr==n-1){
                cout << n << " ";
            }
            else{
                if(ctr%2){
                    cout << mali << " ";
                    mali++;
                }
                else{
                    cout << veliki << " ";
                    veliki++;
                }
            }
            ctr++;
        }
        cout << endl;

    }

    else{
        cout << n+1 << " ";
        int mali=1, veliki=n+3;
        int ctr=1;
        while(ctr<n){
            if(ctr==n-1){
                cout << n+2 << " ";
            }
            else{
                if(ctr%2){
                    cout << mali << " ";
                    mali++;
                }
                else{
                    cout << veliki << " ";
                    veliki++;
                }
            }
            ctr++;
        }
        cout << endl;
        cout << n << " ";
        ctr=1;
        while(ctr<n){
            if(ctr==n-1){
                cout << n-1 << " ";
            }
            else{
                if(ctr%2==0){
                    cout << mali << " ";
                    mali++;
                }
                else{
                    cout << veliki << " ";
                    veliki++;
                }
            }
            ctr++;
        }
        cout << endl;

        /*
        cout << 2*(n/2)+2 << " ";
        ctr=1;
        while(ctr<n){
            if(ctr==n-1){
                cout << 2*(n/2)+4 << " ";
            }
            else{
                if(ctr%2){
                    cout << mali << " ";
                    mali++;
                }
                else{
                    cout << veliki << " ";
                    veliki++;
                }
            }
            ctr++;
        }
        cout << endl;
        */
    }

    // BF za 3
    /*
    for(int a=1; a<=6; a++){
        for(int b=1; b<=6; b++){
            for(int c=1; c<=6; c++){
                for(int d=1; d<=6; d++){
                    for(int e=1; e<=6; e++){
                        for(int f=1; f<=6; f++){
                            set<int> s;
                            s.insert(a);
                            s.insert(b);
                            s.insert(c);
                            s.insert(d);
                            s.insert(e);
                            s.insert(f);
                            if(s.size()==6){
                                int rez=0;
                                rez+=abs(a-b);
                                rez+=abs(b-c);
                                rez+=abs(d-e);
                                rez+=abs(e-f);
                                if(rez == 14){
                                    cout << "rez: " << rez << endl;
                                    cout << "za niz: " << a << " " << b << " " << c << " " << d << " " << e << " " << f << endl;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    */

}