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

MOD = 1000000007
from collections import defaultdict as dd, Counter, deque


def si(): return input()


def ii(): return int(input())


def li(): return list(map(int, input().split()))


def mi(): return map(int, input().split())


def out(v): print(v)


def spout(): print(v, end=" ")


def d2b(n): return bin(n).replace("0b", "")


def twod(n, m, num): return [[num for x in range(m)] for y in range(n)]


def vow(): return ['a', 'e', 'i', 'o', 'u']


def let(): return [chr(i) for i in range(97, 123)]


def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


def ispow2(x):
    return (x and (not (x & (x - 1))))


def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1: factors.append(n)
    return (list(factors))

t=ii()
while t:
    t-=1
    n=ii()
    a=li()
    f=0
    for i in range(n):
        if a[i]!=a[0]:
            f=1
            break
    if f==0: print(-1)
    else:
        m=-1
        for i in range(0,n):
            if i==0:
                if a[1]<a[0]:
                    ans=0
                    m=a[i]
            elif i==n-1:
                if a[n-1]>a[n-2] and a[n-1]>m:
                    ans=n-1
                    m=a[i]
            elif a[i]>m and (a[i+1]<a[i] or a[i-1]<a[i]):
                ans=i
                m=a[i]
        print(ans+1)