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

import sys
from math import sqrt
from collections import defaultdict
inpt = sys.stdin.readline

def inp():
    return(int(inpt()))

def inlist():
    return(list(map(int,inpt().split())))

def instr():
    s = inpt()
    return(list(s[:len(s)-1]))

def inbitstr():
    s = inpt()
    return([int(i) for i in list(s[:len(s)-1])])

def invr():
    return(map(int,inpt().split()))

def printlist(a):
    for i in range(len(a)):
        print(a[i],end='')
    print()

class Graph:

    def __init__(self,n):
        self.n = n
        self.graph = defaultdict(list)
        self.marked = defaultdict(int)
        self.wt = defaultdict(int)
    
    def addEdge(self,u,v,wt):
        self.graph[u].append(v)
        self.graph[v].append(u)
        self.wt[n*u+v] = wt

    def cleanup(self):
        self.marked = defaultdict(int)

    def dfs(self,u):

        self.marked[u] = 1

        max,maxnode = 0,u
        for i in self.graph[u]:
            cur,node = 0,0
            if(self.marked[i] == 0):
                cur,node = self.dfs(i)
            if(cur>max):
                max = cur
                maxnode = node
        
        return 1+max,maxnode

    def lngdfs(self,u,v):

        self.marked[u] = 1

        max = self.n
        for i in self.graph[u]:
            if(i == v):
                return 1
            cur = self.n
            if(self.marked[i] == 0):
                cur = self.lngdfs(i,v)
            if(cur<max):
                max = cur
        
        return 1+max

def main():

    t = inp()

    for l in range(t):
        n = inp()
        a = inlist()

        maxa = max(a)

        escflag = False
        ans = -1

        for i in range(n):
            if(maxa == a[i]):
                if(i==0):
                    chkcon = a[i+1]<a[i]
                elif(i==n-1):
                    chkcon = a[i-1]<a[i]
                else:
                    chkcon = a[i-1]<a[i] or a[i+1]<a[i]

                if(chkcon):
                    ans = (i+1)
                    escflag = True
                    break
        
        print(ans)

main() 

