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

n = int(input())
a = []
for i in range(n):
	x = int(input())
	b = list(map(int, input().split()))
	c = sorted(b)
	max_b = c[-1]
	m = len(b)
	for i in range(m):
		if  i == 0:
			if b[0] == max_b and b[1] < b[0]:
				a.append(1)
				break
		elif i == m - 1:
			if b[-1] == max_b and b[-1] > b[-2]:
				a.append(m)
				break
			else:
				a.append(-1)
				break
		else:
			if b[i] == max_b and (b[i + 1] < b[i] or b[i - 1] < b[i]):
				a.append(i + 1)
				break
for i in a:
	print(i)
