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_int() -> int:
    return int(input())


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


def test_case():
    n = read_int()
    a = tuple(read_ints())
    m = max(a)
    print(-1 if min(a) == m else next(ind for ind, x in enumerate(a, 1) if x == m))


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