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
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush,heappop,heapify
from itertools import permutations,combinations
mod = int(1e9)+7
 
 
ip = lambda : int(stdin.readline())
inp = lambda: map(int,stdin.readline().split())
ips = lambda: stdin.readline().rstrip()
out = lambda x : stdout.write(str(x)+"\n")

t = ip()
for _ in range(t):
    n = ip()
    arr = list(inp())
    ch  = max(arr)
    if arr.count(ch) == n:
        ans = -1
    else:
        for i in range(n):
            if arr[i] == ch:
                if i+1<n:
                    if arr[i+1]<arr[i]:
                        ans = i+1
                        break
                if i-1>=0:
                    if arr[i-1]<arr[i]:
                        ans = i+1
                        break
    out(ans)
            
            
    
        
                    
        
                
                
        
        
        
                

                                        

                                        
                                        
                                        
                                        
                                
            
        
        
    
    
        
        
            
            
    
            
            
                
            
        
        
        
