Problem A
Another Game of Tetris
Input: standard input
Output: standard output
Time Limit: 30 seconds
Memory Limit: 64 MB

We introduce a new game of tetris. It is more fun, since you can choose the piece type yourself! The aim is to cleanup the whole board. i.e no single block should be found. For those who are not familiar with Tetris, let's revise the basic rules of the game(note that some of the rules are modified to simplify the problem).

The board has n columns, numbered 1,2...n from left to right, and each column is infinitely high. 19 pieces are avaliable for you to choose. Note that all the pieces are listed here, so you don't have to rotate them, just choose one column, then put it down to the lowest position.


The rules are:

Find a solution with no more than 10,000 operations to achieve the goal, i.e clean up the whole board.

Input

The first line of the input is a single integer t(1<=t<=10), indicating the number of test cases. Each case contains 2 lines. The first line is a single integer n(1<=n<=100), indicating the number of columns. The next line contains n non-negative integers less than 10, indicating the number of occupied blocks in each column.

Output

For each test case, print a number of lines corresponding to the solution you found. Each line is consist of two integers T, C, indicating the block type and column you chose. Terminate your solution by a line with T=C=-1.

Sample Input
2
5
0 0 0 0 1
4
3 2 3 0

Sample Output
2 1
-1 -1
1 4
9 1
-1 -1


The 2nd OIBH Online Programming Contest. Author: Rujia Liu