1604 - PE - Prime Grid   

Description

In this problem, you are to solve a game which is composed of numbers on cards and a board.

Given a board which contains 2×N grids and 2N cards which are written the numbers 1~2N.  These grids are named a1, b1, a2, b2, …, aN, bN.  The rules of the game are listed as following:

1. Put these 2N cards onto these 2N grids.
2. For each adjacency pair of grids, i.e. (aibi), (aiai+1) or (bibi+1), the sum of numbers on cards should be a prime number.
3. After you finishing put all cards on the board, your solution is presented by listing the cards on a1, a2, …, aN, b1, b2, …, bN. If there are more than 1 solution, the solution starting with smaller number is better.

Given the number N, please output the best solution.

In mathematics, a prime number is a nature number that can only be divided by 1 and itself.

Input

The first line contains one positive integer T, ≤ 10, denoting the number of cases.

There are T lines following, each line contains one positive integer denoting N for this case. ≤ 10.

Output

For each case, there are 2 lines for output. The first line contains N integers, which are a1, a2, …, and aN, separated by a space. The second line contains N integers, which are b1, b2, …, and bN, also separated by a space.

There are no spaces at the end of each line.

Sample Input  Download

Sample Output  Download

Tags




Discuss