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.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class App {

    // public static void promptEnterKey(){
    //     System.out.println("Press \"ENTER\" to continue...");
    //     Scanner scanner = new Scanner(System.in);
    //     scanner.nextLine();
    //     scanner.nextLine();
    //     scanner.nextLine();
    //  }

    public static void main(String[] args) throws Exception {
        // promptEnterKey();
        BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(infile.readLine());
        int N = Integer.parseInt(st.nextToken());
        StringBuilder sb = new StringBuilder();
        outer: while (N-- > 0) {
            int m = Integer.parseInt(infile.readLine());
            int[] arr = new int[m];
            st = new StringTokenizer(infile.readLine());
            for (int i = 0; i < m; ++i) {
                arr[i] = Integer.parseInt(st.nextToken());
            }
            boolean isSol = false;
            for (int i = 1; i < arr.length; ++i) {
                if (arr[i] != arr[i - 1]) {
                    isSol = true;
                }
            }
            if (isSol) {
                int max = arr[0];
                for (int i : arr) {
                    max = Math.max(max, i);
                }
                for (int i = 0; i < arr.length; ++i) {
                    if (arr[i] == max) {
                        if (i > 0 && arr[i - 1] < arr[i] || i + 1 < arr.length && arr[i + 1] < arr[i]) {
                            sb.append(i + 1 + "\n");
                            continue outer;
                        }
                    }
                }
            } else {
                sb.append("-1\n");
            }
        }
        System.out.print(sb);
    }
}
