Median
题号:NC51468
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

JSB has an integer sequence . He wants to play a game with SHB. 

For each , JSB calculates the median of , denoted by b_i. SHB is given the sequence . Can you help him restore the sequence ?

Recall that the median of three numbers is the second largest one of them.

输入描述:

There are multiple cases. The first line of the input contains a single positive integer , indicating the number of cases.

For each case, the first line of the input contains a single integer , the length of the sequence . The second line contains integers .

It's guaranteed that the sum of  over all cases does not exceed .

输出描述:

For each case print one line containing  integers, indicating the sequence . Your output must satisfy  for each .

If there are multiple valid answers, you may print any of them. If there is no valid answer, print"-1" (without quotes) instead.
示例1

输入

复制
4
5
1 2 3
6
1 2 3 4
6
1 2 4 3
6
1 3 4 2

输出

复制
1 1 3 2 3
1 2 1 4 3 4
1 1 4 2 4 3
-1