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

//package other.cf7_div3;

import java.io.*;
import java.util.StringTokenizer;

public class AngryFish {
    public static void main(String[] args) throws IOException {
        final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int t = Integer.parseInt(st.nextToken());
        for (int i = 0; i < t; i++) {
            st = new StringTokenizer(br.readLine());
            int n = Integer.parseInt(st.nextToken());
            int[] arr = new int[n];
            st = new StringTokenizer(br.readLine());
            int max = -1;
            for (int j = 0; j < n; j++) {
                int cnt = Integer.parseInt(st.nextToken());
                if (max < cnt) {
                    max = cnt;
                }
                arr[j] = cnt;
            }

            int index = indexFish(arr, max);
            bw.write(index + "\n");
        }
        bw.flush();
        bw.close();
    }

    private static int indexFish(int[] arr, int max) {
        for (int j = 1; j < arr.length - 1; j++) {
            if (arr[j] == max && (arr[j - 1] < max || arr[j + 1] < max)) {
                return j;
            }
        }
        if (max == arr[0] && max > arr[1]) {
            return 0;
        }
        if (max == arr[arr.length - 1] && max > arr[arr.length - 2]) {
            return arr.length - 1;
        }
        return -2;
    }
}
