Positive integers are listed in two rows. If two equal numbers lie in different rows — one in the first row and the other in the second row — we may connect them with a single line segment. If the value of such a segment is r, we call it an r-matching segment. The figure below shows a 3-matching segment and a 2-matching segment.

For the given input, we want to draw as many matching segments as possible so that all of the following hold:

Write a program that computes the maximum number of matching segments. Note that this number is always even.
The first line contains the number of test cases M (1≤M≤10). Each test case consists of three lines. The first line contains N1 and N2, the number of integers in the first and the second row, respectively. The next line contains the N1 integers of the first row, and the following line contains the N2 integers of the second row. All numbers are positive integers less than 100.
For each test case, print the maximum number of matching segments on its own line.