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 sys import stdin,stdout
import math,bisect
from collections import Counter,deque,defaultdict
L=lambda:list(map(int, stdin.readline().strip().split()))
M=lambda:map(int, stdin.readline().strip().split())
I=lambda:int(stdin.readline().strip())
S=lambda:stdin.readline().strip()
C=lambda:stdin.readline().strip().split()
def pr(a):return("".join(list(map(str,a))))
#_________________________________________________#


def solve():
    n = I()
    a = L()
    x = max(a)
    if a.count(x)==n:
        print(-1)
    else:
        for i in range(1,n):
            if a[i]==x and a[i]>a[i-1]:
                print(i+1)
                break
            elif a[i-1]==x and a[i]<a[i-1]:
                print(i)
                break
for _ in range(I()):
    solve()
