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

'''
problem A
for i in range(int(input())):
      n = int(input())
      if n==1:
            print(1)
      elif n==9999:
            print(90)
      elif n==10000:
            print(95)
      elif len(str(n))==1:
            print(10*(int(str(n)[0])-1)+1)
      elif len(str(n))==2:
            print(10*(int(str(n)[0])-1)+3)
      elif len(str(n))==3:
            print(10*(int(str(n)[0])-1)+6)
      else:
            print(10*(int(str(n)[0])-1)+10)

            
#problem b
for i in range(int(input())):
      n = int(input())
      arr = list(map(int,input().split()))
      if arr.count(1) ==1:
            print(0)
      else:
            l = arr.index(1)
            r = 0
            for i in range(n-1,-1,-1):
                  if arr[i]==1:
                        r = i
                        break
      
            print(arr[l:r+1].count(0))
'''
for i in range(int(input())):
      n = int(input())
      arr = list(map(int,input().split()))
      if len(set(arr))==1:
            print(-1)
      elif len(set(arr))==2:
            print(arr.index(max(arr))+1)
      else:
            for i in range(1,n):
                  if arr[i]>arr[i+1]:
                        print(i+1)
                        break
                  elif arr[i]>arr[i-1]:
                        print(i+1)
                        break
      
            
