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())
for _ in range(0,T):
    n=int(input())
    a,b=map(int,input().split())
    s=input()
    s=[int(x) for x in input().split()]
    for i in range(0,len(s)):
        a,b=map(int,input().split())"""


T=int(input())
for _ in range(0,T):
    n=int(input())
    s=[int(x) for x in input().split()]
    if(len(set(s))==1):
        print(-1)
    else:
        mx=max(s)
        ptr=1
        for i in range(0,len(s)):
            if(s[i]==mx):
                flag=0
                if((i-1)>=0 and s[i-1]!=mx):
                    flag=1
                if((i+1)<n and s[i+1]!=mx):
                    flag=1
                if(flag==1):
                    ptr=i+1
        print(ptr)
                    

        

        
