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 os
import sys
from io import BytesIO, IOBase


def gcd(a,b): 

    #  a>b
    if(b==0): 
        return a 
    else: 
        return gcd(b,a%b)

def prime(n) :  
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True


def divisors(n) : 
      
    # Note that this loop runs till square root 
    i = 1
    div = []
    while i <= math.sqrt(n): 
          
        if (n % i == 0) : 
              
            # If divisors are equal, print only one 
            if (n / i == i) : 
                div.append(i)
            else : 
                # Otherwise print both 
                div.append(i)
                div.append(n//i) 
                
               
                
        i = i + 1
    return div
    
def solve() :
    
    for _ in range(int(input())) :
        
        n = int(input())
        
        a = list(map(int,input().split()))
        
        m = max(a)
        ans = 0
        for i in range(n) :
            
            if a[i]==m :
                
                if i==0 :
                    
                    if a[i+1]<a[i] :
                        
                        ans = i+1 
                        break 
                    
                elif i==n-1 :
                    if a[i-1]<a[i] :
                        ans = i + 1 
                        
                        break 
                    
                else :
                    if a[i-1]<a[i] or a[i+1]<a[i] :
                        
                        ans = i+1 
                        break 
                    
        if ans==0 :
            print(-1)
            
        else :
            print(ans)
                    
                    

def main():
    
    solve()
    pass


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()
