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

sys.setrecursionlimit(10**5)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def MI(): return map(int, sys.stdin.buffer.readline().split())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()

for _ in range(II()):
    n = II()
    aa = LI()

    if aa.count(aa[0]) == n:
        print(-1)
        continue

    mx = max(aa)

    def check():
        for i, a in enumerate(aa):
            if a == mx:
                if i-1 >= 0 and aa[i-1] < a: return i+1
                if i+1 < n and aa[i+1] < a: return i+1

    print(check())
