H. Pollination
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Ryan loves to eat Honey Nut Cereal, but there is a shortage of honey. To get honey, you obviously need to pollinate the flowers.

A flower of size $$$n$$$ resides on a square grid of length $$$2n + 1$$$. The rows are numbered $$$1\dots2n+1$$$ from top to bottom, and the columns are numbered $$$1\dots2n+1$$$ from left to right. The center of the flower is at the cell in row $$$n + 1$$$ and column $$$n + 1$$$. Any cell with a Manhattan distance $$$x$$$ from the center such that $$$1 \leq x \leq n$$$ contains a petal. Note that the center doesn't contain a petal. Below is an example of such a flower.

a flower of size $$$3$$$

You want to cover only the petals of the flower with L-shaped pieces such as the one below. Each petal should be covered by exactly one L-shaped piece. An L-shaped piece is a $$$2\times2$$$ square with one cell removed. You may rotate it however you choose.

L-shaped piece

Tell Ryan if it is possible to pollinate the flower, and if it is, give him a valid configuration of L-shaped pieces that pollinates the flower.

Input

The first line of input contains $$$t$$$, the number of test cases ($$$1 \leq t \leq 500$$$).

Each test case will be one line of input, containing $$$n$$$ ($$$1 \leq n \leq 1000$$$), the size of the flower. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$1000$$$.

Output

If it is possible to pollinate the flower, print an integer $$$l$$$, denoting the number of L-shapes you will use. If it is impossible, print -1.

If it is possible, you must print another $$$l$$$ lines, each describing an L-shaped piece you use. Each line should contain six integers, $$$x_1$$$ $$$y_1$$$ $$$x_2$$$ $$$y_2$$$ $$$x_3$$$ $$$y_3$$$, where ($$$x_1$$$, $$$y_1$$$), ($$$x_2$$$, $$$y_2$$$), and ($$$x_3$$$, $$$y_3$$$) are the cells taken up by the L-shaped piece if ($$$x$$$, $$$y$$$) refers to the cell at row $$$x$$$ and column $$$y$$$.

Example
Input
1
2
Output
4
3 1 3 2 4 2 
1 3 2 2 2 3 
2 4 3 4 3 5 
4 3 4 4 5 3 
Note

Here is an example of a pollinated flower of size $$$2$$$.

Problem Credits: Ariel Shehter