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

#C

tc = int(input())
for case in range(tc):
    input()
    array = list(map(int, input().split(" ")))
    dump = []
    answer = False
    for i in array:
        if i not in dump:
            dump.append(i)
        if len(dump) > 1:
            break
    m = max(array)
    
    if len(dump) > 1:
        answer = True
        i = 0
        while i < len(array):
            if array[i] == m and i == 0 and array[i] > array[i + 1]:
                break
            elif array[i] == m and i == len(array) - 1 and array[i] > array[i] - 1:
                break
            elif array[i] == m and i > 0 and i < len(array) - 1 and (array[i] > array[i - 1] or array[i] > array[i + 1]):
                break
            i += 1
        
    if answer:
        print(i + 1)
    else:
        print(-1)