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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter; // System.out is a PrintWriter
// import java.util.Arrays;
// import java.util.ArrayList;
import java.util.ArrayDeque;
// import java.util.Collections;    //  for ArrayList sorting mainly
// import java.util.HashMap;
// import java.util.hashset;
// import java.util.Random;
import java.util.StringTokenizer;

public class C {
    public static void main(String[] args) throws IOException {
        FastScanner scn = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        int tc = scn.nextInt();
        while (tc-- > 0) {
            int N = scn.nextInt();
            int[] arr = new int[N];
            boolean allSame = true;
            arr[0] = scn.nextInt();
            for (int i = 1; i < N; i++) {
                arr[i] = scn.nextInt();
                if (arr[i] != arr[i - 1]) allSame = false;
            }
            if (allSame) {
                out.println("-1");
                continue;
            }
            ArrayDeque<int[]> st = new ArrayDeque<>();
            for (int i = 0; i < N; i++) {
                if (st.size() == 0) {
                    st.addLast(new int[] { arr[i], i });
                } else if (st.getLast()[0] < arr[i]) {
                    int[] psh = { arr[i], i };
                    while (st.size() > 0 && st.getLast()[0] < psh[0]) {
                        psh[0]++;
                        st.removeLast();
                    }
                    st.addLast(psh);
                } else if (st.getLast()[0] >= arr[i]) {
                    st.addLast(new int[] { arr[i], i });
                }
            }
            int mx = -1;
            for (int[] s : st) {
                mx = Math.max(s[0], mx);
            }
            while (st.getLast()[0] != mx) {
                st.removeLast();
            }
            out.println(st.getLast()[1] + 1);
        }
        out.close();
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner() {
            this.br = new BufferedReader(new InputStreamReader(System.in));
            this.st = new StringTokenizer("");
        }

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException err) {
                    err.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            if (st.hasMoreTokens()) {
                return st.nextToken("").trim();
            }
            try {
                return br.readLine().trim();
            } catch (IOException err) {
                err.printStackTrace();
            }
            return "";
        }

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

    }
}
