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

from sys import stdin, stdout

t =  int(input())

while t > 0:
    t = t - 1
    n = int (input())
    p = list (map(int, stdin.readline().split()))
    
    mm = p[0]
    idx = 0
    same = True

    for i in range(1, n):
        if p[i] > mm:
            mm = p[i]
            same = False
            idx = i
        elif p[i] < mm:
            same = False
    
    if same:
        print(-1)
    else:
        found = False
        for i in range(1, n):
            if p[i] != mm and p[i-1] == mm:
                stdout.write(f'{i}\n')
                found = True
                break
        if found:
            continue
        
        for i in range(0, n-1):
            if p[i]!=mm and p[i+1] == mm:
                stdout.write(f'{i + 2}\n')
                break
