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 DominantPiranha {
    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int test = scanner.nextInt();
        for (int t = 0; t < test; t++) {
            int size = scanner.nextInt();
            int[] arr = new int[size];
            int max=Integer.MIN_VALUE;
            for (int i = 0; i < size; i++) {
                arr[i] = scanner.nextInt();
                max= Math.max(arr[i], max);
            }
            boolean flag=true;
            for(int i=0;i<size;i++){
                if(arr[i]==max){
                    if(i-1>=0){
                        if(max>arr[i-1]){
                            flag=false;
                            System.out.println(i+1);
                            break;
                        }
                    }
                    if(i+1<size){
                        if(max>arr[i+1]){
                            flag=false;
                            System.out.println(i+1);
                            break;
                        }
                    }
                }
            }
            if(flag){
                System.out.println(-1);
            }
        }
    }
}
