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

for _ in range(int(input())):
  n = int(input())
  l = list(map(int,input().split()))
  if (len(set(l))) == 1:
    print(-1)
  else:
    x = l[:]
    x.sort(reverse = True)
    for i in range(len(x)):
      f=0
      for j in range(len(l)):
        if x[i] == l[j]:
          if j==0:
            if l[j+1]<l[j]:
              f=1
            # print("hi1")
              break
          elif j==(n-1):
            if l[j-1]<l[j]:
              f=1
            # print("hi2")
              break
          elif (l[j-1]<l[j]) or (l[j+1]<l[j]):
            f=1
            # print(f"j= {j} hi3")
            break
      if f==1:
        print(j+1)
        break


