Largest Number

easy
You are given an array of N positive integers which represent digits of a number.
You have to form the largest number possible after performing an operation exactly once. The operation is -  
Select two indices a and b, and swap their values.
Print the largest number formed.

Input Format

The first line contain an integer denoting number of test case T For each testcase given an number N. Next line contains N space separated integers

Output Format

The output of each test case contains the largest number formed.

Constraints

1 <= T <= 10^3
1 <= N <= 10^5
1 <= A[i] <= 9

Example

Input
7
7
9 9 4 2 9 2 6
8
5 7 2 3 6 6 8 1
9
9 4 5 8 3 3 3 3 6
4
7 2 9 5
9
5 3 3 1 7 2 6 9 6
11
2 3 7 9 9 9 9 1 7 8 2
10
1 8 7 3 3 6 4 9 8 5
Output
9 9 9 2 4 2 6 
8 7 2 3 6 6 5 1 
9 8 5 4 3 3 3 3 6 
9 2 7 5 
9 3 3 1 7 2 6 5 6 
9 3 7 9 9 9 2 1 7 8 2 
9 8 7 3 3 6 4 1 8 5 
Previous
Pepcoder And Alarm
Next
Do Not Repeat

Related Questions