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 _ in range(t):
    n=int(input())
    l=[int(x) for x in input().split()]
    maxi=max(l)
    if l.count(maxi)==n:
        print("-1")
        continue
    ans=-1
    for i in range(1,n-1):
        if l[i]==maxi:
            if l[i-1]<maxi or l[i+1]<maxi:
                ans=i+1
                break
    if l[n-1]==maxi and l[n-2]<maxi:
        ans=n
    if l[0]==maxi and l[1]<maxi:
        ans=1
    print(ans)



   
        


