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.io.*;
import java.util.*;
// note the class name and the public identifier may differ from one online judge to the other.
public class Main {
	public static void main(String [] argv) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String nCases = br.readLine().trim();
		Integer n = Integer.parseInt(nCases);
		for (int i = 0; i < n; i++){
            Integer x = Integer.parseInt(br.readLine().trim());
            String[] temp = br.readLine().trim().split(" ");
            Integer[] arr = new Integer[temp.length];
            Integer max = -1;
            Set<Integer> set = new HashSet<>();
            for (int j = 0; j < temp.length; j++){
                arr[j] = Integer.parseInt(temp[j]);
                if (arr[j] > max){
                	max = arr[j];
                }
                set.add(arr[j]);
            }

            if (set.size() == 1){
            	System.out.println(-1);
            } else {
            	System.out.println(dominantPiranha(arr, max));            
            }
        }
	}

    static Integer dominantPiranha(Integer[] piranhas, Integer max){
        Integer z = -1;
        Integer n = piranhas.length;
        for (int i = 0; i < n; i++){
            Integer y = piranhas[i];
            if (y == max) {

                if (i - 1 >= 0) {
                    if (piranhas[i - 1] != max) {
                        z = i + 1;
                        break;
                    }
                }

                if (i + 1 < n) {
                    if (piranhas[i + 1] != max) {
                        z = i + 1;
                        break;
                    }
                }
            }
        }
        return z;
    }

}
 		  					  			   	  			 					