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

def B(seq):
	seqAux = seq.copy()
	seqAux.sort()
	return seqAux[len(seqAux)-1]
	
t = int(input())

for e in range(t):
	n = int(input())
	seq = [int(x) for x in input().split()]
	
	maior = B(seq)
	resp = -1
	naoentrou = True
	for i in range(n-1):
		if seq[i] == maior and seq[i+1] < maior:
			resp = i+1
			naoentrou = False
			break
	if naoentrou:
		for i in range(n-1, 0, -1):
			if seq[i] == maior and seq[i-1] < maior:
				resp = i+1
				break
		
	print(resp)
