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,math,itertools
from collections import Counter,deque,defaultdict
from bisect import bisect_left,bisect_right 
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

for _ in range(inp()):
    n = inp()
    a = inpl()
    mx = max(a)
    for i,x in enumerate(a):
        res = False
        if x != mx: continue
        if i == 0:
            if x > a[i+1]:
                res = True
        elif i == n-1:
            if x > a[i-1]:
                res = True
        else:
            if x > a[i+1] or x > a[i-1]:
                res = True
        if res:
            print(i+1)
            break
    else:
        print(-1)