#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    if(n==2){
        cout<<"1 3"<<endl;
        cout<<"4 2"<<endl;
    }
    else if(n==3){
        cout<<"3 1 5"<<endl;
        cout<<"4 2 6"<<endl;
    }
    else if(n==4){
        cout<<"5 1 7 3<<endl;
        cout<<"6 2 8 4"<<endl;
    }
    else{
        cout<<"7 1 9 3 5"<<endl;
        cout<<"8 2 10 4 6"<<endl; 
    }
}