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

for k in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	minimum = 10 ** 9 + 1
	maximum = 0
	for i in range(n):
		if a[i] > maximum:
			maximum = a[i]
		if a[i] < minimum:
			minimum = a[i]
	if maximum == minimum:
		print(-1)
	else:
		maximum_index = []
		for j in range(n):
			if a[j] == maximum:
				maximum_index.append(j)
		if len(maximum_index) == 1:
			print(maximum_index[0] + 1)
		elif maximum_index[len(maximum_index) - 1] < (n - 1):
			print(maximum_index[len(maximum_index) - 1] + 1)
		elif maximum_index[0] > 0:
			print(maximum_index[0] + 1)
		else:
			accept = 1
			for i in range(len(maximum_index) - 1, 0, -1):
				if maximum_index[i] - maximum_index[i - 1] > 1:
					print(maximum_index[i] + 1)	
					break