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 read_int():
	return int(input())

def solve(s):
	max_number = max(s)
	for i in range(0, n):
		if s[i]==max_number:
			for x in [i-1, i+1]:
				if 0<=x<n and s[i]!=s[x]:
					return i+1
	return -1

t = read_int()
for case in range(t):
	n = read_int()
	s = [int(i) for i in input().split(' ')]
	print(solve(s))
