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

import sys

# sys.stdin = open("E:\\programming\\New folder\\input.txt", "r")
# sys.stdout = open("E:\\programming\\New folder\\output.txt", "w")

t = int(input())

for tc in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    mx = index = 0
    if a.count(a[0]) == n:
        print(-1)
        continue
    for i in range(n):
        if a[i] > mx:
            mx = a[i]
            index = i + 1
        if i != 0 and i != n-1:
            if a[i] == mx and (a[i] > a[i-1] or a[i] > a[i + 1]):
                index = i + 1
    print(index)
