In the old city of Damascus, two ancient arrays, $$$a$$$ and $$$b$$$, each of length $$$n$$$, have been discovered by the greatest professor in his prime, George The Great
The legend whispers of a unique measure of beauty for these arrays:
We ask you to print the maximal beauty you can get of the two arrays after rearrangement of the array $$$a$$$.
The first line contains one integer number $$$(1 \le T \le 100)$$$ the number of test cases.
The first line of each test case contains an integer $$$(1 \le n \le 500)$$$.
The second line contains $$$n$$$ integers $$$a_1,a_2,..,a_n (1 \le a_i \le 10^6)$$$. The third line contains $$$n$$$ integers $$$b_1,b_2,..,b_n (1 \le b_i \le 10^6)$$$.
An additional constraint on the input: the sum of $$$n$$$ over all test cases does not exceed $$$500$$$.
For each test case, print a single integer — The maximal beauty of $$$a$$$ and $$$b$$$, or $$$-1$$$ if there is no suitable arrangement.
236 10 121 2 331 2 33 3 3
4 -1