
'N' = 3, 'A' = {1, 2, 3}, 'B' = {2, 3, 1}.
House 1 on the left side has the same colour as house 3 on the right side.
House 2 on the left side has the same colour as house 1 on the right side.
House 3 on the left side has the same colour as house 2 on the right side.
The answer is {3, 1, 2}.
The first line contains an integer 'T', which denotes the number of test cases to be run. Then the test cases follow.
The first line of each test case contains an integer 'N', denoting the number of houses.
The second line contains 'N' space-separated integers denoting the colour of the houses on the left side.
The third line contains 'N' space-separated integers denoting the colour of the houses on the right side.
For each test case, print 'N' space-separated integers denoting the position of the house on the right side with the same colour as 'i-th' house on the left side.
Print the output of each test case in a new line.
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= N <= 10^5
1 <= A[i], B[i] <= N
All the values in 'A' and 'B' are unique.
Sum of 'N' over all test cases is <= 10^5.
Time Limit: 1 sec