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

ans=-1
t=int(input())
for i in range(t):
    n=int(input())
    l=[int(i) for i in input().split()]
    for j in range(n):
        f=1
        w=0
        p=l[j]
        if j==0 and p>l[1]:
            for k in range(1,n):
                if p>l[k]:
                    p+=1
                else:
                    f=0
                    break
        elif j==n-1 and p>l[-2]:
            for k in range(n-2,-1,-1):
                if p>l[k]:
                    p+=1
                else:
                    f=0
                    break
        else:
            x=j
            y=j
            while x>0 or y<n-1:
                if x>0 and l[x-1]<p:
                    x-=1
                    p+=1
                if y<n-1 and l[y+1]<p:
                    y+=1
                    p+=1
                else:
                    f=0
                    break
        if f==1:
            print(j+1)
            break
        if f==0 and j==n-1:
            print(-1)