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(pirahnas, n):
	maxima = []
	max_val = 0
	for i in range(n):
		if pirahnas[i] > max_val:
			max_val = pirahnas[i]
			maxima = [i]
		elif pirahnas[i] == max_val:
			maxima.append(i)

	if len(maxima) == n:
		return -1
	else:
		for i in range(len(maxima)):
			if i != maxima[i]:
				return maxima[i] + 1
		return maxima[-1] + 1

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		pirahnas = [int(a) for a in input().split()]

		assert(len(pirahnas) == n)

		answer = solve(pirahnas, n)

		print(answer)

main()