You are given two stacks of pizzas, but you can only take those pizzas from one stack that are also present in the other stack, in the same order, the pizzas that you can take need not be continuous.

Print the maximum amount of pizzas that you can take. (You can only take pizzas from one of the two stacks)

INPUT
The first line contains only one integer, t, the number of test cases.
For each case, there are two lines:

Line 1: 10 integers, which represent radii of the pizzas in the first stack. Line 2: 10 integers, each of which represent radii of pizzas in the second stack.

OUTPUT:
For each case, a single integer that gives the maximum amount of pizzas that you can take.

Explanation:
Testcase:1
There is exactly one element common in both stack satisfying the given criteria, i.e. 221 Testcase:2
There is no element common in both stack