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):
    n = int(input())
    lst = []
    flag=0
    lst = [int(x) for x in input().split()]
    a = max(lst)
    if(lst[0]==a and lst[1]<a):
        print(1)
        flag=1
    elif(lst[n-1]==a and lst[n-2]<a):
        print(n)
        flag=1
    else:
        for i in range(1,n-1):
            if(lst[i]==a and(lst[i-1]<a or lst[i+1]<a)):
                print(i+1)
                flag=1
                break
    if(flag==0):
        print(-1)