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

t = int(input())


def find_sol():
    n = int(input())
    piranhas = [int(i) for i in input().split()]

    m = -1
    for p in piranhas:
        m = max(m, p)

    for i, p in enumerate(piranhas):
        if p == m:
            if (i > 0 and piranhas[i - 1] < p) or (i + 1 < len(piranhas) and piranhas[i + 1] < p):
                return i + 1
    return -1


for _ in range(t):
    sol = find_sol()
    print(sol)
