D. Yet another permutation problem
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Amir and Akbar have got two arrays, each consisting a permutation of $$$1$$$ to $$$n$$$, They want to play a game, the goal of the game is making the arrays similar, two arrays are similar if they have same length and all of the elements in each index of both arrays are equal.

In each turn one can remove a single integer from his array, If both play optimally, find out the minimum number of turns it takes to finish the game.

Input

The first line of input shows the number of test cases $$$t$$$, Each test case will contain $$$3$$$ lines. The first line contains a single integer $$$n$$$, The length of each array.

$$$1 \le n \le 10^5$$$.

Second and third line each will contain $$$n$$$ space separated integers indicating the numbers in permutations $$$A$$$ and $$$B$$$ respectively.

It's guaranteed that sum of $$$n$$$ overall testcases will not exceed $$$10^5$$$.

Output

For each test case, print a single integer in a line, the minimum number of turns to finish the game.

Example
Input
3
4
1 2 3 4
4 3 2 1
4
1 2 3 4
1 2 4 3
5
4 2 3 5 1
4 5 1 3 2
Output
6
2
4