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 solve(n,a):
	mi = 1e9 + 1
	mii = -1

	ma = -1
	mai = -1

	for i in range(n):
		va = a[i]
		if (va > ma):
			ma = va
			mai = i
	
	res = []
	for i in range(n):
		if a[i] == a[mai]:
			res.append(i)

	def s(mai):
		if (mai > 0 and mai < n-1):
			if a[mai] > a[mai-1] or a[mai] > a[mai+1]:
				return mai
		elif (mai == 0):
			if a[mai] > a[mai + 1]:
				return mai
		elif (mai == n-1):
			if a[mai] > a[mai - 1]:
				return mai

		return -1

	for i in res:
# 		va = a[i]
		tmp = s(i)
		if (tmp != -1):
			return i+1

	return -1







t = int(input())

while (t > 0):
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n,a))