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 you in range(t):
    n=int(input())
    l=input().split()
    li=[int(i) for i in l]
    z=max(li)
    if(li[0]==z and li[1]<z):
        print(1)
        continue
    if(li[-1]==z and li[-2]<z):
        print(n)
        continue
    poss=0
    for i in li:
        if(i!=li[0]):
            poss=1
            break
    if(poss==0):
        print(-1)
        continue
    for i in range(1,n-1):
        if(li[i]==z and (li[i-1]<z or li[i+1]<z)):
            print(i+1)
            break
