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

from collections import defaultdict

def solve(A):
  cnt = defaultdict(list)
  for i, n in enumerate(A):
    cnt[n].append(i)
  if len(cnt) == 1: return -1
  size = max(cnt.keys())
  if len(cnt[size]) == 1: return cnt[size][0] + 1
  for i in cnt[size]:
    if i > 0 and A[i] > A[i-1]: return i + 1
    if i < len(A) - 1 and A[i] > A[i+1]: return i + 1

for _ in range(int(input())):
  input()
  A = [int(x) for x in input().split()]
  print(solve(A))
