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 math

T = int(input())

#lets = 'abcdefghijklmnopqrstuvwxyz'
#key = {lets[i]:i for i in range(26)}

for t in range(T):
  n = int(input())
  #x1,y1,x2,y2 = map(int,input().split())
  a = list(map(int,input().split()))
  #a = list(input())
  #a = input()
  d = False

  if a.count(a[0]) == n:
    print(-1)
    continue
  
  ma = max(a)
  for i in range(n):
    if a[i] == ma and ((i>0 and a[i-1]!=ma) or (i<n-1 and a[i+1]!= ma)):
      print(i+1)
      d = True
      break
  
  