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

def read_generator():
    while True:
        tokens = input().split(' ')
        for t in tokens:
            yield t

reader = read_generator()

def readword():
    return next(reader)

def readint():
    return int(next(reader))

def readfloat():
    return float(next(reader))

def readline():
    return input()


def solve(a):
    m = max(a)
    mc = list(filter(lambda x: x == m, a))

    if len(mc) == len(a):
        return -1

    for i in range(1, len(a)):
        if a[i] != m and a[i - 1] == m:
            return i

    for i in range(len(a) - 1):
        if a[i] != m and a[i + 1] == m:
            return i + 2

tests = readint()

for t in range(tests):
    n = readint()
    a = [readint() for _ in range(n) ]
    print(solve(a))


