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 can_eat(idx, aquarium):
    if idx > 0 and aquarium[idx - 1] < aquarium[idx]:
        return True
    return idx < len(aquarium) - 1 and aquarium[idx + 1] < aquarium[idx]

cases = int(input().strip())
for case in range(cases):
    aquarium_len = int(input().strip())
    aquarium = [int(x) for x in input().strip().split(" ")]
    max_fish = max(aquarium)
    last_fish_idx = -1
    for idx, fish in enumerate(aquarium):
        if fish == max_fish and can_eat(idx, aquarium):
            last_fish_idx = idx + 1

    print(last_fish_idx)
    
