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

t = int(sys.stdin.readline())

ans_arr=[]

for i in range(t):
	n = int(sys.stdin.readline())

	a=[int(j) for j in sys.stdin.readline().split()]

	equal = True
	for g in range(n):
		if(a[g]!=a[0]):
			equal = False
			break

	if(equal):
		ans_arr.append("-1")
	else:
		mx = max(a)
		ans = 1

		for p in range(n):
			if(a[p]==mx):
				if(p-1>=0 and mx>a[p-1]):
					ans = p+1
					break
				if(p+1<n and mx>a[p+1]):
					ans = p+1
					break

		ans_arr.append(str(ans))
		
print("\n".join(ans_arr))