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

from sys import stdout
from sys import stdin
def get():
    return stdin.readline().strip()
def getf():
    return [int(i) for i in get().split()]
def put(a, end = "\n"):
    stdout.write(str(a) + end)
def putf(a, sep = " ", end = "\n"):
    stdout.write(sep.join([str(i) for i in a]) + end)

#from math import ceil, gcd
#from collections import defaultdict as dd
#from bisect import insort, bisect_left as bl, bisect_right as br

def solve(a, n):
    x = 0
    q = []
    for i in range(n):
        if(a[i] > a[x]):
            x = i
    for i in range(n):
        if(a[i] == a[x]):
            q.append(i)
    for i in q:
        if(i > 0):
            if(a[i] > a[i - 1]):
                return i + 1
        if(i < n - 1):
            if(a[i] > a[i + 1]):
                return i + 1
    return -1

def main():
    q = int(get())
    for _ in range(q):
        n = int(get())
        a = getf()
        put(solve(a, n))
main()
