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

n = int(input())
for j in range(n):
    x = int(input())
    y = list(map(int, input().split()))
    g = max(y)
    checked = True
    if x==1:
        print(1)
        continue
    if y[0] > y[1] and y[0] == g:
        print(1)
        checked=False
    for i in range(1, x-1):
        if y[i]==g and ((y[i+1]!=y[i]) or (y[i-1]!=y[i])) and checked:
            checked=False
            print(i+1)
            break
    if (y[x-1] > y[x-2] and y[x-1]==g) and (checked):
        print(x)
        checked=False
    if checked:
        print(-1)