Suppose there are two friends and now they want to test their friendship that how much compatible they are. Given the numbers n numbered from 1 to n and they are asked to rank the numbers. The task is find the compatibility difference between them. Compatibility difference is the number of mis-matches in the relative ranking of the same movie given by them.

```
Input : a1[] = {3, 1, 2, 4, 5}
a2[] = {3, 2, 4, 1, 5}
Output : 2
Explanation : Compatibility difference is two
because first ranks movie 1 before 2 and 4 but
other ranks it after.
Input : a1[] = {5, 3, 1, 2, 4}
a2[] = {3, 1, 2, 4, 5}
Output : 5
Total difference is four due to mis-match in
position of 5
```

**Input:**

First line consists of T test cases. First line of every test case consists of N, denoting number of array elements. Second and third line respectively consists of A1 and A2 array.

**Output:**

Single line output, print the required answer.

**Constraints:**

1<=T<=100

1<=N<=1000

**Example:
Input:**

1

5

3 1 2 4 5

3 2 4 1 5

2

Ibrahim Nash | 77 |

Stark_Maverick | 68 |

wmlam | 54 |

Lam Ngoc Pham | 50 |

Micky_Kt | 48 |

Lam Ngoc Pham | 455 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 363 |

ioan | 319 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2023 |

Jasleen Kaur 2 | 2012 |

Quandray | 1965 |