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())
while t:
    n = int(input())
    a = input()
    a = a.split()
    a = [int(x) for x in a]
    m = max(a)
    p = - 2
    l = a.count(m)
    q=0
    if l == n:
        print(-1)
        t-=1
        continue
    if l == 1:
        q = a.index(m)
        print(q+1)
        t-=1
        continue
    for i in range(l):
        q = a.index(m,q+1)
        if q == 0:
            if a[q]>a[q+1]:
                p = q
                break
        elif q == n:
            if a[q]>a[q-1]:
                p = q
                break
        else:
            if a[q]>a[q-1] or a[q]>a[q+1]:
                p = q
                break
    print(p+1)
    t-=1