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

# Problem: C. Dominant Piranha
# Contest: Codeforces - Codeforces Round #677 (Div. 3)
# URL: https://codeforces.com/contest/1433/problem/C
# Memory Limit: 256 MB
# Time Limit: 2000 ms
# 
# Powered by CP Editor (https://cpeditor.org)

from sys import stdin, stdout 

def INI():
	return int(stdin.readline())
	
def INL():
	return [int(_) for _ in stdin.readline().split()]
	
def INS():
	return stdin.readline()
	
def OPS(ans):
	stdout.write(str(ans)+"\n")
	
def OPL(ans):
	[stdout.write(str(_)+" ") for _ in ans]
	stdout.write("\n")

	
if __name__=="__main__":
	for _ in range(INI()):
		n=INI()
		A=INL()
		
		if [A[0] for _ in range(n)]==A:
			print(-1)
		else:
			m=max(A)
			for _ in range(n):
				if _==0:
					if A[_]==m and A[_]>A[_+1]:
						OPS(_+1)
						break
				elif _==n-1:
					if A[_]==m and A[_]>A[_-1]:
						OPS(_+1)
						break
				else:
					if A[_]==m and (A[_-1]<A[_] or A[_]>A[_+1]):
						OPS(_+1)
						break