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 find_dominant(fish_size_list):
    biggest_size=max(fish_size_list)
    
    biggest_fish_amount=fish_size_list.count(biggest_size)
    if biggest_fish_amount==1:
        return fish_size_list.index(biggest_size)+1
    if biggest_fish_amount==len(fish_size_list):
        return -1
    for i in range(len(fish_size_list)):
        size=fish_size_list[i]
        if size == biggest_size:
            if i==0:
                if fish_size_list[i+1]!=biggest_size:
                    return i+1
            elif i==len(fish_size_list)-1:
                if fish_size_list[i-1]!=biggest_size:
                    return i+1
            else:
                if fish_size_list[i-1]!=biggest_size or fish_size_list[i+1]!=biggest_size:
                    return i+1
                  
    
    
    
    



test_amount=int(input())
for i in range(test_amount):
    fish_amount=int(input())
    fish_size_list=list(map(int,input().split()))
    print(find_dominant(fish_size_list))