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 h in range(n):
    t=int(input())
    l=list(map(int,input().split()))
    c=1
    for i in range(len(l)-1):
        if(l[i]==l[i+1]):
            c=c+1
    y=0
    g=0
    for i in range(1,len(l)-1):
        if(l[i]>=g and(l[i+1]<l[i] or l[i-1]<l[i])):
            g=l[i]
            y=i
    if(l[0]>=g and l[1]<l[0]):
        g=l[0]
        y=0
    if(l[len(l)-1]>=g and l[len(l)-1]>l[len(l)-2]):
        g=l[len(l)-1]
        y=len(l)-1
 
 
 
 
    if(c==len(l)):
        print(-1)
    else:
        print(y+1)