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

from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import random
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))
#sys.setrecursionlimit(1500)
def dict(a):
    d={} 
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d
def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_left(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        n=I()
        l=list(In())
        ans=-1
        temp=l[0]
        size=1

        for x in range(1,n):
            if l[x]<temp:
                size+=1
                temp+=1
            else:
                break
        if size==n:
            print(1)
            return

        temp=l[-1] 
        size=1
        for x in range(n-2,-1,-1):
            if l[x]<temp:
                temp+=1
                size+=1
        if size==n:
            print(n)
            return

        for i in range(1,n-1):
            x,y=i-1,i+1
            temp=l[i]
            size=1
            while (size<n):
                if l[x]<temp and x>=0:
                    x-=1
                    temp+=1
                    size+=1
                elif l[y]<temp and y<n:
                    y+=1
                    temp+=1
                    size+=1
                else:
                    break

            if size==n:
                ans=i
                break

        if ans!=-1:
            print(ans+1)
        else:
            print(-1)

    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    for _ in range(I()):main()
    #for _ in range(1):main()