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 main(String[] args) throws IOException {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            InputReader in = new InputReader(inputStream);
            InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


            int t = in.nextInt();
            while (t-->0) {
                int n = in.nextInt();
                int[] a = new int[n];
                for (int i = 0; i < n; i++) {
                    a[i] = in.nextInt();
                }
                int maxIndex = 0;
                for (int i = 0; i < a.length; i++) {
                    if(a[i] > a[maxIndex]) {
                        maxIndex = i;
                    }
                }
                int ans = -1;
                for (int i = 0; i < a.length; i++) {
                    if(a[i] == a[maxIndex]) {
                        if(i > 0) {
                            if(a[i-1] < a[i]) {
                                ans = i + 1;
                                break;
                            }
                        }
                        if(i < n - 1) {
                            if(a[i+1] < a[i]) {
                                ans = i + 1;
                                break;
                            }
                        }
                    }
                }
                out.println(ans);
            }
            out.flush();
        }
        static boolean isOk(int n) {
            int prev = -1;
            while (n>0) {
                int k = n%10;
                if(prev != -1) {
                    if(k != prev) return false;
                }
                n/=10;
                prev = k;
            }
            return true;
        }
        public int[][] solve(int[][] graph) {
            int n = graph.length;
            int[][] ans = new int[n][n];
            Map<Integer,List<Integer>> map = new HashMap<>();
            for(int i = 0; i < n; i++) {
                map.put(i,new ArrayList<>());
            }
            Set<Integer> set = new HashSet<>();
            for(int i = 0; i < n; i++) {
                dfs(graph,i,i,set,map);
            }
            for(Map.Entry<Integer,List<Integer>> mp : map.entrySet()) {
                int k = mp.getKey();
                List<Integer> values = mp.getValue();
                for(int i : values) {
                    ans[k][i] = 1;
                }
            }
            return ans;
        }
        private void dfs(int[][] graph, int current, int original, Set<Integer> set, Map<Integer,List<Integer>> map) {
            if(set.contains(current)) {
                List<Integer> list = map.get(current);
                map.get(original).addAll(list);
                return;
            }
            int [] a = graph[current];
            List<Integer> l = map.get(original);
            for(int i : a) {
                l.add(i);
                set.add(i);
                dfs(graph,i,original,set,map);
            }
            map.put(original,l);
        }
        private static int gcd(int a, int b) {
            return b == 0 ? a : gcd(b,a%b);
        }
        private static void shuffle(int [] a) {
            for (int i = 0; i < a.length; i++) {
                int index = (int) (Math.random() * a.length);
                int temp = a[index];
                a[index] = a[i];
                a[i] = temp;
            }
        }
    }

    class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }
        public Long nextLong() {
            return  Long.valueOf(next());
        }
        public Double nextDouble () {
            return Double.valueOf(next());
        }


        static class OutputWriter extends PrintWriter {
            public OutputWriter(OutputStream outputStream) {
                super(outputStream);
            }

            public OutputWriter(Writer writer) {
                super(writer);
            }

            public OutputWriter(String filename) throws FileNotFoundException {
                super(filename);
            }

            public void close() {
                super.close();
            }
        }
    }