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

def dominantPiranhas(arr):
    t = arr[0]
    i = 1
    while i < len(arr) and arr[i] == t:
        i+=1
    if i==len(arr):
        print(-1)
        return

    m= max(arr)
    for j in range(len(arr)):
        if arr[j] == m:
            if j-1>=0 and arr[j-1] < arr[j]:
                print(j+1)
                return
            if j+1 <len(arr) and arr[j+1] < arr[j]:
                print(j+1)
                return
t = int(input())
while t:
    n = int(input())
    arr = [int(x) for x in input().split()]
    dominantPiranhas(arr)
    t-=1
