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.*;
import java.util.*;

public class Main {
    public static void findIdx(int[] arr, int n) {
        int[] temp = new int[n];
        for(int i = 0; i < n; i++) temp[i] = arr[i];
        Arrays.sort(arr);
        int max = arr[n - 1];
        int min = arr[0];
        //System.out.println(Arrays.toString(temp));
        if(max == min) {
            System.out.println(-1);
            return;
        } else {
            for(int i = 0; i < n; i++) {
                if(temp[i] == max) {
                    if(i > 0 && temp[i-1] < temp[i]) {
                        System.out.println(i + 1);
                        return;
                    } else if(i <= n-2 && temp[i + 1] < temp[i]) {
                        System.out.println(i + 1);
                        return;
                    } else {
                        continue;
                    }
                }
            }
        }
    }
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        //String file = "./inputC.txt";
        //BufferedReader br = new BufferedReader(new FileReader(file));
        int t = Integer.parseInt(br.readLine());
        while(t-- > 0) {
            int n = Integer.parseInt(br.readLine());
            String[] s = br.readLine().split(" ");
            int[] arr = new int[n];
            for(int i = 0; i < n; i++) {
                arr[i] = Integer.parseInt(s[i]);
            }

            findIdx(arr,n);
        }
    }
}
