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())
while t!=0:
    n=int(input())
    mas = [int(a) for a in input().split()]
    k=max(mas)
    if mas==[k]*len(mas):
        print(-1)
    else:
        mas=[10**9+1]+mas+[10**9+1]
        for i in range(len(mas)):
            if mas[i]==k and (mas[i]>mas[i-1] or mas[i]>mas[i+1]):
                print(i)
                break
    t=t-1