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

for i in range(int(input())):
    n = int(input())
    a = list(map(int,input().split()))
    c = a.count(a[0])
    if c != n:
        res = []
        if a[0]>a[1]:
            res.append(a[0]+1)
        else:
            res.append(a[0])
        mx = [res[0],1]
        for i in range(1,n-1):
            x = a[i]
            if x>min(a[i+1],a[i-1]):
                x += 1
            if x>max(a[i+1],a[i-1]):
                x += 1            
            res.append(x)
            if x>mx[0]:
                mx[0] = x
                mx[1] = i+1
        if a[n-1]>a[n-2]:
            res.append(a[n-1]+1)
            if res[n-1] > mx[0]:
                mx = [res[n-1],n]
        print(mx[1])
    else:
        print(-1)
    
            
    
    
    
