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 i in range(int(input())) :
    n = int(input())
    size = list(map(int, input().split()))

    dicti = {size[i]:i for i in range(n)}

    if len(dicti) == 1 :
        print(-1)
    else :
        max_i = max(size)

        for i in range(len(size)) :
        
            if size[i] == max_i :
                
                if i==0 and size[i+1] != max_i :
                    print(i+1)
                    break
                elif i==len(size)-1 and size[i-1] != max_i :
                    print(i+1)
                    break
                elif i!=0 and i!= len(size)-1 and (size[i-1] != max_i or size[i+1] != max_i) :
                    print(i+1)
                    break