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.
The input holds several test cases. The first line gives the number of test cases. The first line of each test case gives N, the size of Cornell's list, and M, the size of White's list. The next line holds the N names on Cornell's list, and the line after that holds the M names on White's list, separated by spaces. 1≤N≤100000 and 1≤M≤100000. Every name consists of lower case letters only and is at most 10 characters long.
For each test case, print the minimum number of people who attended the party on its own line.