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 dominant(a):
    max_value = max(a)
    for i in a:
        if i != max_value:
            if a[0] == max_value and a[ 1] != max_value:
                return 1
            for j in range(1, len(a)):
                if a[j] == max_value and (a[j - 1] != max_value or a[j + 1] != max_value):
                    return j + 1
    return -1


t = int(input())
for i in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    print(dominant(a))
