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

# cook your dish here
for i in range(int(input())):
    n=int(input())
    l=list(map(int,input().split()))
    max1=max(l)
    ans=-1
    for j in range(1,n-1):
        if l[j]==max1:
            if l[j-1]!=max1 or l[j+1]!=max1:
                ans=j+1
            if ans!=-1:
                break
    s1=set(l)
    if ans==-1 and len(s1)>1:
        if l[0]==max1:
            ans=1
        elif l[-1]==max1:
            ans=n
            
    if ans==-1:
        print(-1)
    else:
        print(ans)
        