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):
    n=int(input())
    ans=[]
    res=0
    l=[int(x) for x in input().split()]
    flag=0
    for i in range(1,n):
        if(l[i]!=l[i-1]):
            flag=1
            break;
    if(flag==1):        
        m=l[0]
        for i in range(1,n):
            if(m<=l[i]):
                m=l[i]
        for i in range(n):
            if(m==l[i]):
                if(i!=0 and i!=n-1):
                    if(l[i-1]!=m or l[i+1]!=m):
                        res=i
                        break
                elif(i==0):
                    if(l[i+1]!=m):
                        res=0
                else:
                    if(l[i-1]!=m):
                        res=i
        print(res+1)
    else:
        print(-1)
    t-=1
