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

t=int(input())
for i in range(t):
  n=int (input())
  lst=list(map(int,input().split()))
  x=-1
  y=max(lst)
  for j in range(len(lst)-1):
    if lst[j]==y and y>lst[j+1]:
      x=j+1
      break
    elif lst[j+1]==y and y>lst[j]:
      x=j+2
      break
  print(x)
