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

import sys
import math
def II():
	return int(sys.stdin.readline())
 
def LI():
	return list(map(int, sys.stdin.readline().split()))
 
def MI():
	return map(int, sys.stdin.readline().split())
 
def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	a = LI()
	if len(set(a)) == 1:
		print(-1)
	else:
		m = max(a)
		for i in range(n):
			boo = False
			if a[i] == m:
				if i-1>-1 and a[i-1]<a[i] or i+1<n and a[i+1]<a[i]:
					boo = True
			if boo == True:
				ans = i+1
		print(ans)