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())
    A=[int(i) for i in input().split(" ")]
    B=A[::-1]
    #N-i-1
    Hai=False
    index=0
    max=A[0]
    for i in range(1,N):
        if A[i]!=A[i-1] and not Hai:
            Hai=True
        if A[i]>max:
            max=A[i]
            index=i 
    if Hai:
        if index!=0:
            print(index+1)
        else:
            for j in range(1,N):
                if A[j]!=max:
                    index=j-1
                    break
            print(index+1)
    else:
        print(-1)