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 os

def main():
  test_cases = int(input())
  ans = [None]*test_cases
  
  for t in range(test_cases):
    n = int(input())
    s = list(map(int ,list(input().split())))
    
    uniques = set()
    max_v = -1
    for i in range(n):
      uniques.add(s[i])
      if s[i] > max_v:
        max_v = s[i]

    ans[t] = -1
    if len(uniques) > 1:
      for i in range(n):
        if s[i] == max_v:
          if (i > 0 and s[i-1] < max_v) or (i < n-1 and s[i+1] < max_v):
            ans[t] = i+1

  os.write(1, "\n".join(map(str, ans)).encode())    

if __name__ == "__main__":
  main()    