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 math as mt
import bisect
import sys
input=sys.stdin.readline
t=int(input())
import collections 
import heapq
#t=1
p=10**9+7
def ncr_util():
    
    inv[0]=inv[1]=1
    fact[0]=fact[1]=1
    for i in range(2,300001):
        inv[i]=(inv[i%p]*(p-p//i))%p
    for i in range(1,300001):
        inv[i]=(inv[i-1]*inv[i])%p
        fact[i]=(fact[i-1]*i)%p

    
def solve():
    maxi=max(l)
    ans1,ans2=-1,-1
    for i in range(n):
        if l[i]==maxi:
            ind=i
            break
    #print(maxi,ind)
    for i in range(ind-1,-1,-1):
        if l[i]!=maxi:
            ans1=i+2
            break
    for i in range(ind+1,n):
        if l[i]!=maxi:
            ans2=i
            break
    if ans1==-1 and ans2==-1:
        return -1
    if ans1!=-1:
        return ans1
    else:
        return ans2
        
            
        
for _ in range(t):
    n=int(input())
    #s=input()
    #n=int(input())
    #h,n=(map(int,input().split()))
    #n1=n
    #x=int(input())
    #b=int(input())
    #n,k,x=map(int,input().split())
    l=list(map(int,input().split()))
    #a,b=map(int,input().split())
    #n=int(input())
    #s=input()
    #s1=input()
    #p=input()
    #l=list(map(int,input().split()))
    #l.sort(revrese=True)
    #l2=list(map(int,input().split()))
    #l=str(n)
    #l.sort(reverse=True)
    #l2.sort(reverse=True)
    #l1.sort(reverse=True)
    #print(ans)
    print(solve())           
        