Cornell Party Retry

No attempts yetTime limit3sMemory limit256 MB

Problem

Ezra Cornell and A. D. White learned their lesson from the last party, so this time they wrote down names instead of identifiers. They also decided their memories were not to be trusted, so they noted every guest's name on arrival. After a few hours they got tired of standing at the door and went off to mingle with the guests. Even then they kept writing down the name of every person they met. They were apart, so the two sets of people they ran into can be completely different.

When the party ended they decided to count how many people had come. They put both lists on the table and realized they can only determine the minimum number of attendees. If a name appears in either list, that person was at the party. Luckily, no two people at the party shared a name. Help Cornell and White find that minimum.

Input

The input holds several test cases. The first line gives the number of test cases. The first line of each test case gives NN, the size of Cornell's list, and MM, the size of White's list. The next line holds the NN names on Cornell's list, and the line after that holds the MM names on White's list, separated by spaces. 1N1000001 \le N \le 100000 and 1M1000001 \le M \le 100000. Every name consists of lower case letters only and is at most 10 characters long.

Output

For each test case, print the minimum number of people who attended the party on its own line.