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

#!/usr/bin/python3
from typing import List


def index(size: List[int], candidate: int) -> int:
    for i in range(len(size)):
        if (
            i + 1 < len(size) \
            and size[i] == candidate \
            and size[i + 1] < size[i]
        ):
            return i
        if i > 0 and size[i] == candidate and size[i - 1] < size[i]:
            return i


if __name__ == "__main__":
    n = int(input())

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

        if len(set(size)) == 1:
            print(-1)
        else:
            print(1 + index(size, max(size)))
