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


numCases = int(input())

for i in range(0, numCases):
	numPiranhas = int(input())
	piranhas = str(input())
	piranhas = [int(n) for n in piranhas.split()]
	index = -1
	maximum = max(piranhas)
	for j in range(0, numPiranhas-1):
		if piranhas[j]==maximum:
			if piranhas[j]>piranhas[j+1]:
				index = j+1
			elif piranhas[j]<piranhas[j+1]:
				index = j+2
			if j>=1:
				if piranhas[j-1]<piranhas[j]:
					index = j+1
		elif piranhas[j+1]==maximum:
			if piranhas[j]<piranhas[j+1]:
				index = j+2




	print(index)