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

try:
    T=int(input())
    for i in range(T):
        def checkme(A):
            if A[0]==maxi and A[1]!=maxi:
                return (1)
            elif A[-1]==maxi and A[-2]!=maxi:
                return (len(A))
            for i in range(1,len(A)-1):
                if A[i]==maxi and( A[i-1]<maxi or A[i+1]<maxi):
                    return i+1
            return -1
    
        n=int(input())
        A=list(map(int,input().split()))
        maxi=max(A)
        print(checkme(A))
except:
    pass