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

N = int(input())

for i in range(N):
    n = int(input())
    a = list(map(int,input().split()))
    domIndex = -1
    domMax = 1
    for k in range(n):
        if a[k] > domMax - 1:
            if((k != 0 and a[k - 1] < a[k]) or (k != n - 1 and a[k + 1] < a[k])):
                domMax = a[k]
                domIndex = k
            elif a[k] > domMax + 1:
                domMax = a[k]
                domIndex = -1
    if domIndex == -1:
        print(domIndex)
    else:
        print(domIndex + 1)