Two arrays in ascending order are given. Find the largest number that appears in both arrays.
The first line of the input file contains the length of the first array (N \le 100000). The next line contains numbers in ascending order.
The second line of the input file contains the length of the second array (M \le 100000). The next line contains numbers in ascending order.
Output the largest number that appears in both arrays, or output -1 if there is no such number.
Example 1