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

#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

for ii in range(int(input())):
	n = int(input())
	a = list(map(int , input().split()))
	m = max(a)
	ind = [i for i in range(n) if a[i] == m]
	f = 0
	#print(ind)
	for i in ind:
		if (i - 1 >= 0 and a[i - 1] < m) or (i + 1 < n and a[i + 1] < m):
			ans = i + 1
			f = 1
	if f:
		print(ans)
	else:
		print(-1)
		








'''
# Wrap solution for more recursion depth
#submit as python3
import collections,sys,threading
sys.setrecursionlimit(10**9)
threading.stack_size(10**8)



threading.Thread(target=solve).start()
'''
