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(input())
while(t):
    t-=1
    n=int(input())
    g=[]
    idx=0
    l=list(map(int,input().split()))
    if l.count(l[0])==n:
        print(-1)
    elif l.count(max(l))==1:
        print(l.index(max(l))+1)
    else:
        k=max(l)
        if l[0]==k and l[0]>l[1]:
            print(1)
        else:
            for i in range(1,n):
                if l[i]==k and (l[i]>l[i+1] or l[i]>l[i-1]):
                    print(i+1)
                    break
            