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
from collections import Counter
from collections import OrderedDict
from functools import reduce
sys.setrecursionlimit(10**6)
def inputt():
    return sys.stdin.readline().strip()
def printt(n):
    sys.stdout.write(str(n)+'\n')
def listt():
    return [int(i) for i in inputt().split()]
 
def gcd(a,b): 
   return math.gcd(a,b) 
 
def lcm(a,b): 
    return (a*b) // gcd(a,b) 

def factors(n):    
    return set(reduce(list.__add__,([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))


t= int(inputt())
for _ in range(t):
    n=int(inputt())
    s=listt()
    count=0
    d=Counter(s)
    maxi=max(d)
    if len(d)==1:
        print(-1)
    else:
        for i in range(n):
            if  s[i]==maxi:
                if (i!=0 and s[i-1]<s[i]):
                    print(i+1)
                    break
                elif (i!=n-1 and s[i+1]<s[i]):
                    print(i+1)
                    break


