eolymp
bolt
Try our new interface for solving problems
Problems

Tribute

Tribute

The Son of Heaven, our beloved emperor, has commanded you, his First Minister, to extort tribute from n neighbouring kingdoms. Each of the tributaries has been assigned a number of silver coins to pay - for the i-th kingdom, the number is ai. To show His infinite grace, the emperor decided to only take money from some of the countries, sparing the rest. Your overzealous finance minister, after writing down all ai's, has already produced all possible 2n - 1 income values - the sums of the non-empty subsets of tributaries. Unfortunately, the minister lost the paper sheet with original tribute values in the process. For this infraction, as well as improper calligraphy, he was promptly executed.

Now you only have 2n - 1 sums, written rather badly. Can you recover the tribute values from them?

Input

The first line contains the number of test cases z (1z200). The descriptions of the test cases follow.

Every test case consists of two lines: the first contains a number n (1n20), the second - 2n - 1 integers not exceeding 2 * 109, denoting all the possible sums of tributes. Assume that the tribute values were all positive integers. The total number of sums in all test cases does not exceed 107.

Output

For each test case output the recovered values of ai for i = 1, 2, .., n, in increasing order. If there are no values that fit the input, or if there are multiple possibilities, simply write "NO" instead - you cannot execute anyone twice.

Time limit 6 seconds
Memory limit 128 MiB
Input example #1
1
3
1 2 3 3 4 5 6
Output example #1
1 2 3
Source 2018 Petrozavodsk, Winter, Jagiellonian U, January 30, Problem B