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

from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
from itertools import *
import sys
input=sys.stdin.readline
def inp():
    return int(input())
def st():
    return input().rstrip('\n')
def lis():
    return list(map(int,input().split()))
def ma():
    return map(int,input().split())
t=inp()
while(t):
    t-=1
    n=inp()
    a=lis()
    z=max(a)
    li=[]
    for i in range(n):
        if(a[i]==z):
            li.append(i)
    fl=0
    for i in range(1,len(li)-1):
        if(li[i-1]+1!=li[i] or li[i]+1!=li[i+1]):
            fl=1
            re=li[i]+1
            break
    if(min(a)==z):
        print(-1)
    else:
        if(fl):
            print(re)
        else:
            if(len(li)==1):
                print(li[0]+1)
            else:
                if(li[0]!=0 or li[1]-1!=li[0]):
                    print(li[0]+1)
                else:
                    print(li[-1]+1)
