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

caseNum = int(input())
for i in range(caseNum):
    piranhaNum = int(input())
    piranhaSize = list(map(int,input().split(' ')))
    largestPira = max(piranhaSize)
    find = False
    for j in range(piranhaNum):
        if j == 0 :
            if piranhaSize[j] == largestPira and piranhaSize[j] > piranhaSize[j+1]:
                find = True
                print(j+1)
                break
        elif j == piranhaNum - 1 :
            if piranhaSize[j] == largestPira and piranhaSize[j] > piranhaSize[j - 1]:
                find = True
                print(j+1)
                break
        elif piranhaSize[j]==largestPira and piranhaSize[j] > min(piranhaSize[j-1],piranhaSize[j+1]):
            find = True
            print(j+1)
            break
    if not find:
        print(-1)
