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

def solve():
    n = int(input())
    a = list(map(int,input().split()))
    dom = False
    for i in range(1,n):
        if a[i] != a[0]:
            dom = True
            break
    if not dom:
        print(-1)
    else:
        siz = 0
        idx = -1
        for i in range(1,n-1):
            if(a[i] > min(a[i-1],a[i+1])):
                if a[i] > siz:
                    siz = a[i]
                    idx = i
        if a[0] > a[1] and a[0] > siz:
            idx = 0
            siz = a[0]
        if a[n-1] > a[n-2] and a[n-1] > siz:
            idx = n-1
        print(idx+1)

for _ in range(int(input())):
    solve()
