The first line contains a single integer T(1≤T≤30) , the number of test cases.
For each test case, the first line gives two integers n, k(1≤n≤200,1≤k≤10).
The next line gives the permutation P that consists of 2×n×2k integers pi(1≤pi≤2×n×2k).
It is guaranteed that ∑2×n×2k doesn't exceed 106.