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

'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input().rstrip()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
# mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1



    
def solve():


    

    for _ in range(ii()):

        n = ii()
        a = li()
        if len(set(a)) == 1:
            print('-1')
            continue
        x = max(a)
        p = []
        for i in range(n):
            if a[i] == x:
                p.append(i)

        ans = -2
        for i in p:
            if i > 0 and i < n-1:
                if a[i-1] != x or a[i+1] != x:
                    ans = i
                    break
            if i == 0:
                if a[i+1] != x:
                    ans = i
                    break
            if i == n-1:
                if a[i-1] != x:
                    ans = i
                    break
        print(ans+1)

        

        















        
if __name__ =="__main__":

    if(file):

        if path.exists('input.txt'):
            sys.stdin=open('input.txt', 'r')
            sys.stdout=open('output.txt','w')
        else:
            input=sys.stdin.readline
    solve()
