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 solve():
    n = int(input())
    a = []
    s = input()
    for i in s.split():
        x = int(i)
        a.append(x)

    m = -2
    if a[0] > a[1]:
        m = 0
    if (a[0] <= a[n-1]) and (a[n-1] > a[n-2]):
        m = n-1

    for i in range(1, n-1):
        if ((a[i] > a[i-1]) or (a[i] > a[i+1])) and ((a[m] < a[i]) or m == -2):
            m = i

    print(m + 1)


while t > 0:
    solve()
    t -= 1