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

testCount = int(input())
indexMatrix = []


def solve(pCount, piranha, offset):
    for i in range(pCount):
        if piranha[i] == offset:
            if (i != pCount - 1 and (piranha[i] > piranha[i + 1])) or (i != 0 and (piranha[i] > piranha[i - 1])):
                return i+1
    return -1


for i in range(testCount):
    pCount = int(input())
    piranha = list(map(int, input().split()))
    max = sorted(piranha, reverse=True)
    # print("ccccc", max[0])
    indexMatrix.append(solve(pCount, piranha, max[0]))

for i in indexMatrix:
    print(i)
