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

t = int(input())
while t:
	n = int(input())
	s = list(map(int,input().split()))
	
	if len(s) == 1:
		print(1)
		t-=1
		continue

	all_same = True
	curr = s[0]
	for i in range(len(s)):
		if s[i]!=curr:
			all_same = False

	if all_same:
		print(-1)
		t-=1
		continue

	max_val = 0
	for i in range(len(s)):
		max_val = max(max_val,s[i])
	
	if s[0] == max_val:
		if len(s) > 1:
			if s[1] < max_val:
				print(1)
				t-=1 
				continue

	if s[-1] == max_val:
		if len(s) > 1:
			if s[-2] < max_val:
				print(len(s))
				t-=1
				continue 

	for i in range(1,len(s)-1):
		if s[i] == max_val:
			if s[i-1] < max_val or s[i+1] < max_val:
				print(i+1)
				break
	
	t-=1 