Professor Bae teaches a class called "Problem Solving" at Gyeryong University. The students discuss the homework that was assigned the day before the class, so every assignment has to be finished within that one day.
Professor Bae is lazy. He announces the homework to exactly one student and expects the students to pass it along by phone. Every student knows every other student's number. Students care only about their own score, so nobody passes the news on right away. A student starts making calls only after finishing the homework.
There are N students, s1,s2,…,sN, and si needs ti hours to finish an assignment. The clock works like this.
Write a program that computes the shortest time, in hours, for every student to finish the homework.
Take N=3, t1=1, t2=1, t3=3, with Professor Bae announcing the homework to s1 at 3 o'clock. Then s1 finishes at 4 o'clock. If s1 calls s2 at 4 o'clock, s2 finishes at 5 o'clock, and at 5 o'clock either s1 or s2 can call s3. Then s3 finishes at 8 o'clock, so everyone needs 5 hours. If s1 calls s3 first at 4 o'clock, 4 hours are enough.
Your program reads from standard input. The first line holds the number of test cases T (1≤T≤20). The first line of each test case holds an integer N (1≤N≤10), the number of students. The next line holds N integers t1,t2,…,tN (1≤ti≤10). Professor Bae always announces the homework to s1 first.
Your program writes to standard output. Print exactly one line for each test case. The line holds a single integer, the shortest time in hours for every student to finish the homework.