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

test_num = int(input())
while test_num :
    test_num -= 1
    length = int(input())
    fish = [int(n) for n in input().split()]
    a,b = max(fish),min(fish)

    if a == b :
        print(-1)
        continue

    site = fish.index(a)
    if site :
        print(site+1)
    else :
        while site < length-1 :
            if fish[site]!=fish[site+1] :
                print(site+1)
                break
            else :
                site += 1
                
        
    
                            
        
        
