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
sysinput = sys.stdin.readline

import time
start_time = time.time()

############ ---- Input Functions ---- ############
def inp():
    return(int(sysinput()))
def inlt():
	return(list(map(int,sysinput().split())))

def insr():
    s = sysinput()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,sysinput().split()))

def answer(n,a):
	if len(set(a))==1:
		return -1
	lfish = max(a)
	for i in range(1,n):
		if a[i-1] != a[i]:
			if a[i] == lfish:
				return i+1
			elif a[i-1] == lfish:
				return i


t = inp()
while (t>0):
	t-=1
#----------------Code Start--------------------
	n = inp()
	a = inlt()
	print (answer(n,a))
