#include <bits/stdc++.h>
#define STAMPA for (int i = 1; i < n-1; ++i) {if (i % 2 == 0) {
#define ZID_1 printf("%d ", n-1);
#define ZID_2 printf("%d ", n);
#define ZID_3 printf("%d ", n+1);
#define ZID_4 printf("%d ", n+2);
#define V_DOLE printf("%d ", v--);
#define V_GORE printf("%d ", v++);
#define M_DOLE printf("%d ", m--);
#define M_GORE printf("%d ", m++);
using namespace std;

int main() {
    int n, i;
    scanf("%d", &n);
    int m = 1, v = n*2;

    ZID_1
    STAMPA
            V_DOLE
    } else {M_GORE
    }}
    ZID_3
    printf("\n");
    ZID_2
    STAMPA
            M_GORE
    } else {V_DOLE
    }}
    ZID_4


    return 0;
}