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 _ in range(int(input())):
	input()
	pirs = list(map(int, input().split()))
	if len(set(pirs)) == 1:
		print(-1)
	else:
		m = max(pirs)
		i = 0
		while i < len(pirs):
			if pirs[i] != m:
				i+=1
				continue
			o = pirs[i]
			if (i and pirs[i-1] < o) or (i < len(pirs) - 1 and pirs[i+1] < o):
				print(i+1)
				break
			i+=1