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

public class Piranha {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while (t-- > 0) {
            int n = in.nextInt();
            int[] qus = new int[n];
            int maxSize = Integer.MIN_VALUE;
            for (int i = 0; i < qus.length; i++) {
                qus[i] = in.nextInt();
                maxSize = Math.max(maxSize, qus[i]);
            }
            ArrayList<Integer> arrayList = new ArrayList<>(n);
            for (int i = 0; i < qus.length; i++) {
                if (qus[i] == maxSize) {
                    arrayList.add(i);
                }
            }
            if (arrayList.size() == n) {
                System.out.println(-1);
                continue;
            }
            if (arrayList.get(0) != 0) {
                System.out.println(arrayList.get(0) + 1);
                continue;
            }
            int i;
            for (i = 0; i < arrayList.size(); i++) {
                if (arrayList.get(i) != i) {
                    System.out.println(arrayList.get(i - 1) + 1);
                    break;
                }
            }
            if (i == arrayList.size()) {
                System.out.println(arrayList.get(i - 1) + 1);
            }
        }
    }
}
