//O(n!) by Lukas
#include <iostream>
using namespace std;

#define rep(i,a,b) for(__typeof(b) i=a; i<(b); ++i)

int main()
{
    int t; cin >> t;
    rep(cases,0,t)
    {
        if (cases) cout << endl;
        int n; cin >> n;
        if (n % 2 == 0) cout << "Impossible" << endl;
        else
        {
            rep(i,0,n) cout << (i + 1) % n + 1 << " "; cout << endl;
            rep(i,0,n) cout << (i + 2) % n + 1 << " "; cout << endl;
        }
    }
}
