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

nums = [1,1,1,1]
def main(nums):
  if len(set(nums))==1:
    print(-1)
    return
  stack = []
  for i in range(len(nums)):
    if stack==[]:
      stack.append([nums[i],i])
      continue
    if stack[-1][0]==nums[i]:
      stack.append([nums[i],i])
    elif stack[-1][0]<nums[i]:
      stack[-1] = [nums[i]+1,i]
    elif stack[-1][0] > nums[i]:
      stack[-1][0]+=1
  x = 0
  ind = -1
  for i in stack:
    if i[0]>x:
      x = i[0]
      ind = i[1]
  print(ind+1)
n = int(input())
for i in range(n):
  input()
  x = list(map(int,input().split(' ')))
  main(x)