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())
def check(arr,n,index,size):
    for i in range(index+1,n):
        if size>arr[i]:
            size+=1
        else:
            return False
    for i in reversed(range(index)):
        if size>arr[i]:
            size+=1
        else:
            return False
    return True

while t>0:
    t-=1
    n=int(input())
    arr=[int(x) for x in input().split()]
    dict={}
    maxi=0
    for i in range(1,n-1):
        if arr[i]>maxi:
            maxi=arr[i]

        if arr[i]>arr[i+1] or arr[i]>arr[i-1]:
            dict[arr[i]]=i
    if arr[0]>maxi:
        maxi=arr[0]
    if arr[0]>arr[1]:
        dict[arr[0]]=0
    if  arr[-1]>maxi:
        maxi=arr[-1]
    if arr[-1]>arr[-2]:
        dict[arr[-1]]=n-1

    if len(dict)==0:
        print(-1)

    for size in sorted(dict,reverse=True):
        if size==maxi:
            print(dict[size]+1)
            break

        else:
            if check(arr,n,dict[size],size)==True:
                print(dict[size]+1)
                break
