1322 Sums


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

You are given K integers and I want to know the SUM of the biggest TEN numbers. Can you write a program and tell me the result?

Input

The input are divided into two parts: The 1st line: An integer(0<N<=10), which means there are N test cases in the input. The 2nd-(N+1)th line: each line contains a test case. For each line, the first number K(10<=K<=100000) means there are K integers in the line, then followed by K integers, the maximum number is less than 100,000 and the minimum number is more than -100,000.

Output

For each test case, you should output a line which contains only one integer: the answer of the test case.

Sample

Input

2
11 1 1 1 1 1 1 1 1 1 1 10
12 -100 1 2 3 4 5 6 7 8 9 10 -1

Output

19
55

Source: lily


Comments

There are no comments at the moment.