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

def count(array,l):
    comp = 0
    for i in range(l-1):
        if array[i] == array[i+1]:
            comp += 1
    if comp == l-1:          
        return -1
    elif l == 1:
        return 1
    else:
        m = max(array)
        steps = 0
        for i in range(l-1):
            if array[i] == m and array[i] != array[i+1]:
                return i+1
        for i in range(l):
            if array[i] == m:
                return i+1
                
T = int(input())
for i in range(T):
    l = int(input())
    array = list(map(int,input().split()))
    print(count(array,l))
