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())
i = 0
while i < t:

    n = int(input())

    x = list(map(int, input().split()))
    index = 0
    valid = 1
    while index < n:
        if x[index] == x[0] and valid:
            index += 1
            continue
        else:
            valid = 0
            break
    if valid:
        print(-1)
    else:
        index = 1
        valid = 1
        maximum = x[0]
        I = 0
        while index < n:
            if x[index] > maximum:
                valid = 0
                I = index
                maximum = x[index]
            elif x[index] < maximum:
                valid = 0
            elif x[index] == maximum:
                if valid:
                    x[index] = maximum
                    I = index
            index += 1
        print(I+1)
    

    
    i += 1
