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 dom(l, n):
    p=max(l) 
    if len(set(l))==1:
        return -1
    if l[0]==p and l[1]<l[0]:
        return 1
    if l[n-1]==p and l[n-2]<l[n-1]:
        return n
    i=1
    while(i<n-1):
        if l[i]==p and (l[i-1]<l[i] or l[i+1]<l[i]):
            return i+1
        i+=1
t=int(input())
for g in range(t):
    n=int(input())
    l=list(map(int, input().split()))
    print(dom(l, n) )