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 sys
try:
    import os
    f = open('input.txt', 'r')
    sys.stdin = f
except FileNotFoundError:
    None
from math import sqrt, ceil
input=lambda: sys.stdin.readline().strip()

o=int(input())
for _ in range(o):
    n=int(input())
    A=list(map(int,input().split()))
    x=max(A)

    if A[0]==x and A[1]!=x:
        print(1);continue
    if A[-1]==x and A[n-2]!=x:
        print(n);continue
    for i in range(1,n-1):
        if A[i]==x and not(A[i-1]==x and A[i+1]==x):
            print(i+1);break
    else:print(-1)
