Ramzi Sarnayeh has founded a new suburban services company named Undetermined Ideas (UI). Since UI is still in its early days, Ramzi has not hired any employees yet. Therefore, for now, he must manage all tasks himself. Recently, he has received several projects from government agencies and has divided them into small, independent subprojects of various values. Assume that each subproject requires exactly one unit of time to complete. Because Ramzi's time is limited, he wants to maximize his total earnings by selecting the most valuable subprojects he can complete within his available time.
The first line contains the number of test cases. Each test case is given on a single line and begins with two integers: the available time and the number of subprojects (0 \leq t,\ p \leq 1000). This is followed by non-negative integers p_i (0 \leq p_i \leq 32767), representing the values of the subprojects. All numbers in each test case are separated by spaces.
For each test case, output a single integer in a separate line: the maximum possible sum of values of subprojects Ramzi can earn within the allotted time.
Example 1