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):
    length = int(input())
    vector = list(map(int, input().split()))
    max_num = max(vector)
    n1 = True
    maxs = []
    for j in range(length):
        if vector[j] == max_num:
            maxs.append(j)
        if vector[j] < max_num:
            n1 = False
    if n1 == True:
        print(-1)
    else:
        for k in maxs:
            if k-1 >= 0 and vector[k-1] < max_num or k+1 < length and vector[k+1] < max_num:
                print(k+1)
                break
