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 itertools import tee, chain


def read_int() -> int:
    return int(input())


def read_ints():
    return map(int, input().split(' '))


INF = 9999999999999


def test_case():
    n = read_int()
    a = tuple(read_ints())
    m = max(a)
    a = tuple(chain((INF,), a, (INF,)))
    i1, i2, i3 = tee(a, 3)
    next(i2)
    next(i3)
    next(i3)
    for ind, (x, y, z) in enumerate(zip(i1, i2, i3), 1):
        if y == m and (INF != x != y or y != z != INF):
            return ind
    return -1


if __name__ == '__main__':
    for _ in range(read_int()):
        print(test_case())
