#UnknownID31. XHXMMMlOP0x3Wg#^;")

XHXMMMlOP0x3Wg#^;")

Statement

Pak Chanek has an array a a of n n positive integers. Since he is currently learning how to calculate the floored average of two numbers, he wants to practice it on his array a a .

While the array a a has at least two elements, Pak Chanek will perform the following three-step operation:

  1. Pick two different indices i i and j j ( 1i,ja 1 \leq i, j \leq |a| ; ij i \neq j ), note that a |a| denotes the current size of the array a a .
  2. Append ai+aj2 \lfloor \frac{a_i+a_j}{2} \rfloor ^{\text{∗}} to the end of the array.
  3. Remove elements ai a_i and aj a_j from the array and concatenate the remaining parts of the array.

For example, suppose that a=[5,4,3,2,1,1] a=[5,4,3,2,1,1] . If we choose i=1 i=1 and j=5 j=5 , the resulting array will be a=[4,3,2,1,3] a=[4,3,2,1,3] . If we choose i=4 i=4 and j=3 j=3 , the resulting array will be a=[5,4,1,1,2] a=[5,4,1,1,2] .

After all operations, the array will consist of a single element x x . Find the maximum possible value of x x if Pak Chanek performs the operations optimally.

^{\text{∗}} x \lfloor x \rfloor denotes the floor function of x x , which is the greatest integer that is less than or equal to x x . For example, 6=6 \lfloor 6 \rfloor = 6 , 2.5=2 \lfloor 2.5 \rfloor=2 , 3.6=4 \lfloor -3.6 \rfloor=-4 and π=3 \lfloor \pi \rfloor=3

Format

Input

Each test contains multiple test cases. The first line contains the number of test cases t t ( 1t5000 1 \le t \le 5000 ). The description of the test cases follows.

The first line of each test case contains a single integer n n ( 2n50 2 \le n \le 50 ) — the length of the array a a .

The second line of each test case contains n n integers a1,a2,,an a_1, a_2, \ldots, a_n ( 1ai109 1 \le a_i \le 10^9 ) — the elements of the array a a .

Do note that the sum of n n over all test cases is not bounded.

Output

For each test case, output a single integer: the maximum possible value of x x after all numbers have been picked.

Sample

3
5
1 7 8 4 5
3
2 6 5
5
5 5 5 5 5
6
4
5