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

for _ in range(int(input())):
    n=int(input())
    l=list(map(int,input().split()))
    p=max(l)
    res=0
    s=[]
    f=0
    for i in range(n):
        if l[i]==p:
            s.append(i)
    s.append(n)
    if(len(s)==2):
        f=1
        print(s[0]+1)
    else:
        for i in range(1,len(s)):
            if(s[i]-s[i-1]>1):
                
                if(s[i-1]==0 or l[s[i-1]-1]<l[s[i-1]] or l[s[i-1]+1]<l[s[i-1]]):
                    f=1
                    print(s[i-1]+1)
                    break
    if(f==0):
        if(s[0]!=n and (l[s[0]-1]<l[s[0]] or l[s[0]+1]<l[s[0]])):
            print(s[0]+1)
        else:
            print(-1)
        
        