The first line contains one positive integer T (1≤T≤50), denoting the number of test cases. For each test case:
The first line of the input contains one integer n,(2≤n≤5000).
The second line of the input contains n−1 integer: b1,b2,⋯,bn−1
There are no more than 20 cases with n>300.