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 CodeForce_Round_677_Div3_ProblemC_DominantPiranha {

    public static void main(String[] args) {
        process();
    }

    public static void process() {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        for(int i = 0; i < t; ++i) {
            int n = scanner.nextInt();
            int[] piranha = new int[n];
            for(int j = 0; j < n; ++j) {
                piranha [j] = scanner.nextInt();
            }
            int index = calculate(piranha);
            System.out.println(index);
        }
    }

    public static int calculate(int[] piranha) {
        int max = piranha[0];
        for(int i = 0; i < piranha.length; ++i) {
            if(piranha[i] > max) {
                max = piranha[i];
            }
        }

        for(int i = 0; i < piranha.length; ++i) {
            if(piranha[i] == max) {
                if(i > 0 && piranha[i] > piranha[i-1]) {
                    return i+1;
                }
                if(i < piranha.length-1 && piranha[i] > piranha[i+1]) {
                    return i+1;
                }
            }
        }

        return -1;
    }

}
