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

for t in range(int(input())):
    n = int(input())
    p = list(map(int, input().split()))
    if len(set(p)) == 1:
        print(-1)
        continue
    m = max(p)
    index = p.index(m)
    if index == 0 and p[1] == p[0]: 
        index += 1
        while len(set([p[index-1], p[index], p[index+1]])) == 1:
            index += 1
    print(index + 1)