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

t = int(input())
for test_case in range(t):
    n = [int(x) for x in input().split()]
    n = n[0]

    a = [int(y) for y in input().split()]

    res = 0
    maxpir = [a[0], 0]
    maxpirs = []
    for i in range(n):
        if a[i] > maxpir[0]:
            maxpir[0], maxpir[1] = a[i], i

    for i in range(n):
        if a[i] == maxpir[0]:
            maxpirs.append(i)
    
    for i in maxpirs:
        if i >= 1:
            if a[i - 1] < maxpir[0]:
                res = i
                break
            elif i <= n - 2:
                if a[i + 1] < maxpir[0]:
                    res = i
                    break
        elif i <= n - 2:
            if a[i + 1] < maxpir[0]:
                res = i
                break
    else:
        res = -2

    res += 1

    
    print()
    print(res)
    print()