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

# sys.stdin = open("input.txt", 'r', encoding="utf-8")


def getMaxes(aq):
    res = []
    m = max(aq)
    for i, item in enumerate(aq):
        if item == m:
            res.append(i)
    return res


def killemall(aq):
    m = max(aq)
    res = -1
    for i in range(len(aq)):
        if aq[i] == m:
            if i > 0 and aq[i - 1] != m:
                res = i + 1
            if i < len(aq) - 1 and aq[i + 1] != m:
                res = i + 1
    return res


n = int(input())
for _ in range(n):
    __ = int(input())
    print(killemall(list(map(int, input().split()))))
