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.*;

public final class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int T = sc.nextInt();
        for (int t = 0; t < T; t++) {
            int n = sc.nextInt();
            var fishes = new ArrayList<Integer>();
            for (int i = 0; i < n; i++) {
                int f = sc.nextInt();
                fishes.add(f);
            }
            if (n > 1) {
                var m = fishes.get(0);
                boolean allSame = true;
                for (var f : fishes) {
                    if (!m.equals(f)) {
                        allSame = false;
                        break;
                    }
                }
                if (allSame) {
                    System.out.println(-1);
                    continue;
                }
            }
            int idMax = 0;
            for (var i = 1; i < n; i++) {
                if (fishes.get(i) > fishes.get(idMax)) {
                    idMax = i;
                }
            }
            boolean hasAns = false;
            for (int i = 0; i < n; i++) {
                if (i - 1 >= 0 && fishes.get(i).equals(fishes.get(idMax)) && fishes.get(i - 1) < fishes.get(i)) {
                    hasAns = true;
                    idMax = i;
                }
                if (i + 1 < n && fishes.get(i).equals(fishes.get(idMax)) && fishes.get(i + 1) < fishes.get(i)) {
                    hasAns = true;
                    idMax = i;
                }
            }
            if (hasAns)
                System.out.println(idMax + 1);
            else
                System.out.println(-1);
        }
    }
}
