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):
	if len(piranhas)==1:
		return 1
	m = max(piranhas)
	for i, x in enumerate(piranhas):
		if x == m:
			if i>0 and piranhas[i-1]!=m:
				return i+1
			if i<len(piranhas)-1 and piranhas[i+1]!=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))