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 div3._1433;

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

public class DominantPiranha {

    private final FastReader fr = new FastReader();

    public static void main(String[] args) {
        new DominantPiranha().solve();
    }

    private void solve() {
        int t = fr.nextInt();
        while (t-- > 0) {
            System.out.println(solve(fr.nextInt(), fr.nextLine()));
        }
    }

    private int solve(int n, String s) {
        int[] piranhas = Arrays.stream(s.trim().split(" ")).mapToInt(Integer::valueOf).toArray();
        List<Integer> mayBeDominants = new ArrayList<>();
        int max = piranhas[0];
        mayBeDominants.add(0);
        for (int i = 1; i < piranhas.length; i++) {
            if (max < piranhas[i]) {
                mayBeDominants.clear();
                max = piranhas[i];
                mayBeDominants.add(i + 1);
                continue;
            }
            if (piranhas[i] == max)
                mayBeDominants.add(i + 1);
        }

        for (int i : mayBeDominants) {
            if ((i + 1 < piranhas.length && max > piranhas[i]) || (i - 1 >= 0 && max > piranhas[i - 2])) return i;
        }

        return -1;

    }

    private static final class FastReader {
        private final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        private StringTokenizer st;

        public String nextLine() {
            try {
                return br.readLine();
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }

}