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

t=int(raw_input())
for _ in range(t):
    n=int(raw_input())
    l=list(map(int,raw_input().split()))
    ind=[]
    m=max(l)
    for i in range(n):
        if l[i]==m:
            ind.append(i)
    
    if len(ind)==n:
        print(-1)
        continue
    if len(ind)==1:
        print(ind[0]+1)
        continue
    
    elif len(ind)==2:
        if ind[0]==0:
            print(ind[1]+1)
            continue
        else:
            print(ind[0]+1)
            continue
    
    else:
        for i in range(len(ind)):
            if ind[i]-1>=0 and ind[i]+1<=n-1:
                if l[ind[i]-1]<m or l[ind[i]+1]<m:
                    print(ind[i]+1)
                    break
            
        