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


def read(func=int):
    return func(sys.stdin.readline().strip())

def readList(func=int):
    return list(map(func, sys.stdin.readline().strip().split()))


t = read()

for _ in range(t):
    n = read()
    A = readList()
    a = -1

    maxi = max(A)
    for i in range(n):
        prev = maxi
        post = maxi
        if i > 0:
            prev = A[i - 1]
        if i < n - 1:
            post = A[i + 1]

        if A[i] == maxi and (prev != maxi or post != maxi):
            a = i + 1
            break

    print(a)
