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

q = int(input())
# list(map(int, input().split()))

def f(p, i):
  if i == 0 and len(p) == 1:
    return False

  if i == 0:
    if p[i] > p[i+1]: return True
    else: return False

  if i == len(p) - 1:
    if p[i] > p[i-1]: return True
    else: return False

  if p[i] > p[i-1] or p[i] > p[i+1]:
    return True
  else:
    return False

  return False

for i in range(0, q):
  n = int(input())
  p = list(map(int, input().split()))
  
  l = []
  m = p[0]
  mi = 0
  otv = -1
  h = f(p,0)
  if h: otv = 0
  l.append([p[0], 0, h])
  for i in range(1, n):
    if m == p[i]:
      c = f(p,i)
      if c: otv = i
      l.append([p[i], i, c])
    elif m < p[i]:
      c = f(p,i)
      if c: otv = i
      m = p[i]
      mi = i
      l = [[p[i], i, c]]

  if (n == 1):
    print(1)
  elif (len(l) == len(p)):
    print(-1)
  else:
    print(otv + 1)
  
