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 = input()

res = []

def dominant(piranhas):
	m = max(piranhas)
	flag = piranhas[0] == m
	for i, x in enumerate(piranhas):
		if flag and x != m:
			return i
		if not flag and x==m:
			return i+1
	return -1

for test in range(t):
	n = input()
	piranhas = raw_input().split(" ")
	res.append(str(dominant(piranhas)))

print("\n".join(res))