#include <iostream>
#include <vector>
#include <math.h>
using namespace std;

int main()
{
    int n; cin >> n;
    vector<int> a(n);
    vector<int> b(n);
    if(n == 3)
    {
        cout << "6 1 5" << endl;
        cout << "4 2 3";
    }
}