Raikage is very keen to celebrate Chocolate’s day in hidden cloud village . He has N packets of
chocolates with ith of packet has Ai chocolate .
Chocolates are kept in a straight line with increasing serial order .
He gives some packets of chocolates to guests in order as they are kept.
He gives a guest at least as much chocolate as he gave to the guest before him .
He wants to give chocolates to as much guest as possible .
Now , as we know , our Raikage is fan of chocolates , he considers himself as a guest and that guest which is one to get the last set of chocolates.
He wants as much chocolate as he can get keeping the condition that maximum number of guest get the chocolates .
As you are Killer B , Hero of Cloud village and his brother . He comes to you with the problem of giving chocolates to maximum number of guest. Among all possibilities with the highest number of guests, he wants to find the one in which he gets the highest number of chocolates..
Please help him to find maximum number of chocolates he can get satisfying all the condition.
The first line of the input contains an integer T denoting the number of test cases.
The description of T test cases follows.
The first line of each testcase contains a positive integer N - the number of packets of chocolates.
The second line contains N space-separated positive integers with ith integer representing the number of chocolates
in ith packet i.e. Ai
For each test case, print a single integer denoting maximum number of chocolates he can have.