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

t = int(input())
res = [0 for i in range(0, t)]
for _ in range(0, t):
  n = int(input())
  a = list(map(int, input().split()))
  mx = -1
  ind = -1
  if a[0] > a[1]:
    mx = a[0]
    ind = 1
  for i in range(1, len(a)-1):
    if a[i] >= mx and (a[i] > a[i+1] or a[i] > a[i-1]):
      mx = a[i]
      ind = i + 1
  if a[len(a) - 1] > a[len(a) - 2] and a[len(a)-1] >= mx:
    mx = a[len(a) - 1]
    ind = len(a)
  res[_] = ind
for i in range(0, t):
  print(res[i])