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.util.StringTokenizer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        for (int T = 0; T<t; T++) {
            int n = fs.nextInt();
            int[] a = fs.readArray(n);
            int[] sorted = a.clone();
            Arrays.sort(sorted);
            if (sorted[0] == sorted[sorted.length-1]) {
                System.out.println(-1);
            } else {
                int maxPirraya = sorted[sorted.length-1];
                for (int i = 0; i<n; i++) {
                    if (maxPirraya == a[i]) {
                        if (i == 0) {
                            if (a[i+1] < maxPirraya) {
                                System.out.println(i+1);
                                break;
                            }
                        } else if (i == n-1) {
                            if (a[i-1] < maxPirraya) {
                                System.out.println(i+1);
                                break;
                            }
                        } else {
                            if (a[i-1] < maxPirraya || a[i+1] < maxPirraya) {
                                System.out.println(i+1);
                                break;
                            }
                        }
                    }
                }
            }

        }
        /*
        System.out.println(maxPirraya);
                        System.out.println(i);
         */






    }
    public static int gcd(int a, int b) {
        if (a==0) {
            return b;
        } else {
            return gcd(b, a%b);
        }
    }
    static void sort(int[] a) {
        ArrayList<Integer> l=new ArrayList<>();
        for (int i:a) l.add(i);
        Collections.sort(l);
        for (int i=0; i<a.length; i++) a[i]=l.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

}
