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
from sys import stdin,stdout

t=int(input())

while(t > 0) :
    t-=1
    n=int(input())
    lst = []
    lst = [int(x) for x in stdin.readline().split()]
    m=0
    for i in range(0,n) :
        if lst[i] > m :
            m= lst[i]
            
    index=-1
    for i in range(0,n) :
        if lst[i]==m :
            if i-1>=0 and lst[i-1]!=m :
                index=i
                break;
            if i+1<n and lst[i+1]!=m :
                index=i
                break;
    if index==-1 :
        print(-1)
        continue
    print(index+1)
                
                
                
                