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

n = int(input())
l = list()
ln = list()
for i in range(n):
    ln.append(int(input()))
    l.append(list(map(int, input().rstrip().split())))
for ml in(l):
    p = 1
    m = ml[0]
    df = False
    if len(ml) == 1:
        df=True
    result = -1
    for i in ml:
        if not df:
            if i != m:
                df =True
            if i >= m:
                result = p
                m = i
        else:
            if i > m:
                result = p
                m = i
        p+=1
    if df :
        print(result)
    else:
        print(-1)