#C9793. Largest Number

    ID: 53925 Type: Default 1000ms 256MiB

Largest Number

Largest Number

Given a list of non-negative integers, arrange them such that they form the largest possible number when concatenated. For two numbers a and b, we define their order by comparing the concatenated strings in both orders: $$a \oplus b = ab$$ and $$b \oplus a = ba$$. The number which gives the larger concatenation should come first.

Your task is to handle multiple test cases. For each test case, you are given a list of integers. Output the largest number that can be formed by concatenating these integers.

Note: If the resulting number has leading zeros, output just a single "0".

inputFormat

The first line of input contains a single integer T which denotes the number of test cases. Each of the following T lines contains a test case. Each test case is given as a sequence of space-separated non-negative integers.

outputFormat

For each test case, output the largest possible number (as a string) on a new line. If the constructed number contains leading zeros, output "0".

## sample
1
10 2 9
9210

</p>