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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {
    public static BufferedReader bf;

    public static void main(String[] args) throws IOException {
        bf = new BufferedReader(new InputStreamReader(System.in));
        int T = Integer.parseInt(bf.readLine().trim());
        PrintWriter out = new PrintWriter(System.out);
        while (T-- > 0) {
            int N = Integer.parseInt(bf.readLine().trim());
            int[] arr = readIntArray(0);
            long ans = 0;
            if (N == 1)
                ans = 1;

            else {

                boolean flag = false;
                // check if all are same
                for (int i = 1; i < arr.length; i++) {
                    if (arr[i] - arr[i - 1] != 0) {
                        flag = true;
                    }
                }

                // if all are not same
                if (flag) {
                    //find max

                    int max = arr[0];
                    int maxIndex = 0;
                    for (int i = 1; i < arr.length; i++) {

                        if (arr[i] > max && arr[i - 1] < arr[i] || i+1<arr.length &&  arr[i + 1] < arr[i]) {
                            max = arr[i];
                            maxIndex = i;
                        }
                    }

                    ans = maxIndex + 1;
                } else
                    ans = -1;

            }
            out.println(ans);
        }
        out.flush();
    }

    private static int[] readIntArray(int startIndex) throws IOException {
        String[] ip = bf.readLine().split(" ");
        int[] arr = new int[ip.length];
        int j = -1;

        if (startIndex == 1)
            j = 0;

        for (String str : ip)
            arr[++j] = Integer.parseInt(str);


        return arr;

    }
}
