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.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        in.nextLine();

        int piranhaNum = 0;
        int piranhaSize = 0;
        int dominantIndex = 0;
        int largestPiranhaSize = 0;
        int smallestPiranhaSize = 1000000000;

        for (int i = 0 ; i < n ; i++){

            largestPiranhaSize = 0;
            smallestPiranhaSize = 1000000000;
            dominantIndex = 0;

            piranhaNum = in.nextInt();
            in.nextLine();

            for (int j = 0; j < piranhaNum ; j++){
                piranhaSize = in.nextInt();

                if (piranhaSize < smallestPiranhaSize ){
                    smallestPiranhaSize = piranhaSize;
                }
                if (piranhaSize > largestPiranhaSize){
                    largestPiranhaSize = piranhaSize;
                    dominantIndex = j+1;
                }
            }

            if (largestPiranhaSize != smallestPiranhaSize ){
                System.out.println(dominantIndex);
            } else{
                System.out.println(-1);
            }

            in.nextLine();
        }
    }
}
