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

tc = int(input())
for k in range(tc):
    N = int(input())
    A = [int(n) for n in input().split()]

    mx = 0
    al = True
    for i in range(N):
        mx = max(mx, A[i])
        if i - 1 >= 0:
            al = al and A[i] == A[i - 1]
    
    if al:
        print(-1)
        continue
    
    for i in range(N):
        al = A[i] == mx
        if A[i] == mx:
            if i + 1 < N and A[i + 1] != mx:
                print(i + 1)
                break
            if i - 1 >= 0 and A[i - 1] != mx:
                print(i + 1)
                break
    


            

