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 i in range(t):
    size = int(input())
    aqua = list(input().split(" "))
    aquarium = []
    for x in aqua:
        aquarium.append(int(x))
    a = aquarium.index(max(aquarium))
    b = a
    while b<size-1:
        if aquarium[b] > aquarium[b+1]:
            print(b+1)
            b = size + 1
            break
        else:
            b+=1
    if b==size-1:
        b = a
        while b>0:
            if aquarium[b]>aquarium[b-1]:
                print(b+1)
                b = -100
                break
            else:
                b-=1
    if b==0:
        print("-1")
            
    
    
