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())
for tt in range (t):
    n=int(input())
    a=list(map(int,input().split()))
    b=[]
    m=max(a)
    for i in range(n):
        if a[i]==m:
            b.append(i)
    c=-1
    for i in range (len(b)):
        if b[i]==0:
            if a[1]<m:
                c=1
                break
        elif b[i]==n-1:
            if a[n-2]<m:
                c=n
                break
        elif a[b[i]+1]<m or a[b[i]-1]<m:
            c=b[i]+1
            break
    print(c)