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())
    list1 = list(map(int,input().split()))

    maxi = max(list1)
    possible = []
    for i in range(len(list1)):
        if list1[i]==maxi:
            possible.append(i)

    f=1
    fa=-1
    for uu in range(len(possible)):
        j = possible[uu]-1
        k = possible[uu]+1
        val = maxi
        f = 1
        fa = possible[uu]
        while True:
            inside = 0
            if j<0 and k>=len(list1):
                break
            else:

                if j>=0 :
                    if list1[j]<maxi:
                        maxi+=1
                        j-=1
                        inside=1
                if k<len(list1):
                    if list1[k]<maxi:
                        k+=1
                        maxi+=1
                        inside=1
            if inside==0:
                f=0
                break

        if f==1:
            break
    if f==0:
        print(-1)
    else:
        print(fa+1)


    t-=1