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.*;
import java.io.*;
public class S {
    static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

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

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            float nextFloat() {
                return Float.parseFloat(next());
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (Exception e) {
                    e.printStackTrace();
                }
                return str;
            }

            char nextChar() {

                char c = ' ';
                try {
                    c = (char) br.read();
                } catch (Exception e) {
                    e.printStackTrace();
                }
                return c;
            }
    }

    public static void main(String[] args) {

        FastReader sc = new FastReader();

        int ntc = sc.nextInt();

        while(ntc -- > 0)
        {
            int n = sc.nextInt();

            int [] arr = new int[n];

            int max = Integer.MIN_VALUE;

            int idx = -1;

            for (int i = 0; i < n; i++) {
                arr[i] = sc.nextInt();
                max = Math.max(arr[i], max);
            }

            for (int i = 0; i < n; i++) {
                if(arr[i] == max){
                    if(i == 0){
                        if(arr[i] > arr[i + 1]){
                            idx = i;
                        }
                    }else if(i ==n - 1){
                        if(arr[i] > arr[i - 1]){
                            idx =i;
                        }
                    }else if(arr[i] > arr[i + 1] || arr[i] > arr[i - 1]){
                        idx = i;
                    }
                }
            }

            if(idx == -1){
                System.out.println(-1);
            }else {
                System.out.println(idx + 1);
            }


        }
    }
}