The first line contains an integerdenoting the number of test cases (
).
The first line in a test case contains two integersand
(
,
). The sum of
over all test cases does not exceed
.
The second line in a test case contains a permutation(
).
For each test case, output one line containing the answer modulo.