There is an n \times 1 board. Its cells are numbered with integers from to . The first four cells have indistinguishable chips in them. In one turn, you can move one chip to the neighbouring cell or move it symmetrically relative to any other chip (i.e., if you move a chip in cell symmetrically relative to the chip in cell , it will end up in cell ), given that the chip will not leave the board and each cell will have at most one chip. You need to determine the minimum number of turns needed to reach a certain configuration of chips.
The first line of input contains the number (1 \leq T \leq 10000) — the number of test cases. The next lines each contain four integers a_1, a_2, a_3, and a_4 (1 \leq a_1, a_2, a_3, a_4 \leq n, n = 20) — the numbers of the cells where the chips should be in the final configuration.
For each test case, print a single integer — the answer to the problem in the statement.
Example 1