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>0:
    t-=1
    n=int(input())
    a=list(map(int,input().split()))
    if len(set(a))==1:
        print(-1)
    else:
        b=[]
        for i in range(len(a)-1):
            if a[i]>a[i+1]:
                b.append([a[i],i])
        for i in range(1,len(a)):
            if a[i]>a[i-1]:
                b.append([a[i],i])
        m=-10**18
        j=0
        
        for i in b:
            if i[0]>m:
                m=i[0]
                j=i[1]+1
        print(j)        