Because the answer is very large, we should output the result of the answer modulo .
The input consists of multiple test cases. The first line contains an integer— the number of test cases.
In each testcase, the first line contains three integers.
The second line containsintegers
, representing the
elements of
.
For each test case,output one line containing one integer:.
It is guaranteed that.
It is not guaranteed that the elements inare distinct.