{"raw_statement":[{"iden":"statement","content":"DreamGrid and BaoBao are playing a game.  There are $n$ soldiers in the game, numbered from $1$ to $n$. The $i$-th soldier has a power value of $a_i$. DreamGrid and BaoBao are going to divide the soldiers into several teams according to the rules below:\n\n- A team must consist of 1 or 2 soldiers.\n- Every soldier must belong to exactly 1 team.\n- If a team consists of two soldiers (let's say they are the $i$-th and the $j$-th soldier), there must be $|i - j| = 1$.\n\nThe power value of a team is defined as the sum of the team members' power values. For the sake of fairness, they want to minimize the difference between the maximum team power value and the minimum team power value after the division. You are asked to find the minimum difference.\n\n"},{"iden":"input","content":"There are multiple test cases. The first line of the input contains an integer $T$, indicating the number of test cases. For each test case:\n\nThe first line contains an integer $n$ ($1 \\le n \\le 10^5$), indicating the number of soldiers.\n\nThe second line contains $n$ integers $a_1, a_2, ... , a_n$ ($-10^9 \\le a_i \\le 10^9$), where $a_i$ indicates the power value of the $i$-th soldier.\n\nIt's guaranteed that the sum of $n$ in all test cases will not exceed $10^6$.\n"},{"iden":"output","content":"For each test case output one line containing one integer, indicating the minimum difference between the maximum team power value and the minimum team power value.\n"},{"iden":"note","content":"We now explain the first sample test case. All possible divisions are listed below.\n\n| Division | Difference | Division | Difference |\n| :-: | :-: | :-: | :-:|\n|[-1], [4], [2], [1], [1] | 4 - (-1) = 5| [-1, 4], [2], [1], [1] | 3 - 1 = 2 |\n| [-1], [4], [2], [1, 1] | 4 - (-1) = 5 | [-1], [4, 2], [1, 1] | 6 - (-1) = 7 |\n| [-1], [4], [2, 1], [1] | 4 - (-1) = 5 |  [-1, 4], [2], [1, 1] | 3 - 2 = 1 |\n| [-1], [4, 2], [1], [1] | 6 - (-1) = 7 | [-1, 4], [2, 1], [1] | 3 - 1 = 2 |\n\n\nSo the answer is $\\min(5, 5, 5, 7, 2, 7, 1, 2) = 1$."}],"translated_statement":null,"sample_group":[["3\n5\n-1 4 2 1 1\n4\n1 3 2 4\n1\n7","1\n2\n0"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}