1
3
5 3 4
 6
5
5 3 4 4 5
3
1 1 1
5
4 4 3 4 4
5
5 5 4 3 2
3
1 1 2
5
5 4 3 5 5
 1
3
10 1 5

1
 1
-1
2
2
3
1
 1

def solve(query):
    arr = [int(i) for i in query.split(' ')]
    max_val = max(arr)
    if arr[0] == max_val and arr[0] > arr[1]:
        return 1
    if arr[-1] == max_val and arr[-1] > arr[-2]:
        return len(arr)
    for i in range(1, len(arr) - 1):
        if arr[i] == max_val and (arr[i] > arr[i-1] or arr[i] > arr[i+1]):
            return i + 1
    return -1

t = int(input())
for _ in range(t):
    input()
    query = input().strip()
    print(solve(query))