AT_abc398_c [ABC398C] Uniqueness
Description
There are $ N $ people, labeled $ 1 $ to $ N $ . Person $ i $ has an integer $ A_i $ .
Among the people who satisfy the condition "None of the other $ N-1 $ people has the same integer as themselves," find the one with the greatest integer, and print that person's label.
If no person satisfies the condition, report that fact instead.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $
Output Format
If no person satisfies the condition "None of the other $ N-1 $ people has the same integer as themselves," print `-1`.
Otherwise, among those who satisfy it, print the label of the person whose integer is the largest.
Explanation/Hint
### Sample Explanation 1
Those who satisfy the condition are the persons labeled $ 4 $ , $ 7 $ , $ 8 $ , and $ 9 $ .
Their integers are $ 7 $ , $ 4 $ , $ 5 $ , and $ 8 $ , respectively, and the person with the largest integer is the person labeled $ 9 $ .
Thus, the answer is $ 9 $ .
### Sample Explanation 2
If no person satisfies the condition, print `-1`.
### Constraints
- $ 1 \leq N \leq 3\times 10^5 $
- $ 1 \leq A_i \leq 10^9 $
- All input values are integers.