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

import java.util.*;

public class DominantPiranha {
    public static void main(String [] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();

        for(int i = 0; i < t; i++) {
            int n = input.nextInt();

            List<Integer> numbers = new ArrayList<>();
            for(int j = 0; j < n; j++)
                numbers.add(input.nextInt());

            if(numbers.stream().distinct().count() == 1)
                System.out.println(-1);
            else
                solve(numbers);

        }
    }

    public static void solve(List<Integer> numbers) {
        int max = Collections.max(numbers);
        int index = -1;

        for(int i = 0; i < numbers.size(); i++) {
            if(numbers.get(i).equals(max)) {
                int firstIndex = i - 1;
                if(firstIndex > -1 && numbers.get(firstIndex) != max) {
                    index = i;
                    break;
                }

                int secondIndex = i + 1;
                if(secondIndex < numbers.size() && numbers.get(secondIndex) != max) {
                    index = i;
                    break;
                }
            }
        }

        System.out.println(index == -1 ? -1 : index + 1);
    }
}