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

def dominant_piranha(arr):
  dom_obj = {}

  for i in range(0, len(arr)):
    if(i == 0):
      if(arr[i] > arr[i+1]):
        dom_obj[i+1] = arr[i]
    elif(i == (len(arr) - 1)):
      if(arr[i] > arr[i-1]):
        dom_obj[i+1] = arr[i]
    elif(arr[i] > arr[i-1] or arr[i] > arr[i+1]):
      dom_obj[i+1] = arr[i]

  dom_obj = {k: v for k, v in sorted(dom_obj.items(), key=lambda item: item[1])}
  dom = dom_obj.popitem()[0] if bool(dom_obj) else -1
  print(dom)


t = input()
for i in range(0, int(t)):
  n = input()
  arr = input().split(' ')
  dominant_piranha(arr)