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

from sys import stdin,stdout
n=int(stdin.readline())
for i in range(n):
    k=stdin.readline()
    lst=[int(i) for i in stdin.readline().split()]
    c=max(lst)
    temp=lst[0]
    ans=-1
    indx=1
    for i in lst[1:]:
        if i==temp and i==c:
            indx+=1
            continue
        if i==c and i!=temp:
            ans=indx
            break
        if temp==c and i!=temp:
            ans=indx-1
            break
        indx+=1
    if ans==-1:
        ans=-2
    stdout.write(str(ans+1)+'\n')
        
    




    
