Bob is given three arrays \(A\), \(B\) and \(C\) of length \(N\) each. A pair of indices \((i,j)\), where \(0 \leq i, j \lt N\) is called good if \(A[i]\) is equal to \(B[C[j]]\).
Find an integer \(X\) denoting the number of good indices.
Input format
Output format
For each test case, print an integer \(X\) denoting the number of good indices in a new line.
Constraints
\(1 \leq T \leq 10 \\ 1 \leq N \leq 10^5 \\ 0 \leq A[i], B[i], C[i] \lt N\)
For test case \(1\):
Hence the answer is \(3\).
For test case \(2\): \(N\) is 1. So, only one good pair exists.