Genetic engineering is an area of biology that deals with the development of new species of animals and plants. Recently, geneticists conducted experiments to create a "cutlet tree"—a tree on which cutlets grow instead of apples. New samples were created in laboratory "XX" and then sent for research to two other laboratories. Each sample underwent complex and costly experiments in both laboratories: one analyzed the possibility of cutlets having a crisp crust, and the other analyzed the productivity of the trees. The results of experiments in each laboratory were recorded in a special journal:
In the first laboratory, the journal contains the numbers of samples in which a crisp crust consistently appeared.
In the second laboratory, the journal contains the numbers of samples with a yield of at least one hundred cutlets per year.
The experiments were long and complex. Eventually, each laboratory announced the numbers of successful samples in their journals. However, people want trees that have both properties! Therefore, it became a task to find a sample number that appears in the list of successful experiments from each laboratory. Your task is to write a program to solve this problem.
The first line contains the number (0 \leq N \leq 100000), the number of records in the first journal. The next numbers, given in ascending order, are the numbers of successful samples from the first laboratory's journal. The following line contains (0 \leq M \leq 100000), followed by numbers in ascending order. All numbers in the arrays do not exceed 10^9 in absolute value (these are the numbers of successful samples from the second laboratory's journal).
Print the maximum possible required number if it exists; otherwise, print .
Example 1