The two countries of A and B are at war against each other. Both countries have N number of soldiers. The power of these soldiers are given by A[i]...A[N] and B[i]....B[N].
These soldiers have a pecularity. They can only attack their counterpart enemies, like A[i] can attack only B[i] and not anyone else. A soldier with higher power can kill the enemy soldier. If both soldiers have same power, they both die. You need to find the count of remaining soldiers of A and B at the end of the war. Also, print the winner country.
The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows. Each testcase contains three lines of input:-
The number of soldiers N.
Powers of A country's soldiers Ai ... AN separated by spaces
Powers of B country's soldiers Bi ... BN separated by spaces
For each testcase, print the remaining soldiers of both A and B, and the winner country. If the remaining soldiers are equal for both countries, the war ends up draw.
See examples for more clarity.
1 <= T <= 100
1 <= N <= 2000
0 <= Ai <= 1000