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

for j in range(int(input())):
    n=int(input())
    vals=list(map(int,input().split()))
    #look at the position of all the maximums
    maxy=max(vals);found=False;index=-1
    for s in range(n):
        if vals[s]==maxy:
            if s>0 and vals[s-1]<maxy:
                found=True;index=s
            if s<n-1 and vals[s+1]<maxy:
                found=True;index=s
    if found==False:
        print(-1)
    else:
        print(index+1)