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
input = lambda: sys.stdin.readline().rstrip()
# import sys
# import math
# input = sys.stdin.readline
from collections import deque
from queue import LifoQueue

def binary_search(a, n):
  L = 0
  R = len(a)-1
  while L<=R:
    mid = L+(R-L)//2
    if a[mid]==n:
      return mid
    elif a[mid]<n:
      L = mid+1
    else:
      R = mid-1
  return -1

for _ in range(int(input())):
  n = int(input())
  a = list(map(int, input().split()))
  maxi = max(a)
  if maxi==min(a):
    print(-1)
  else:
    for i in range(len(a)-1):
      if a[i]==maxi and a[i+1]!=maxi:
        print(i+1)
        break
      elif a[i+1]==maxi and a[i]!=maxi:
        print(i+2)
        break
