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.*;
/**
 *
 * @author alanl
 */
public class Lcc {

    /**
     * @param args the command line arguments
     */
    static BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static void main(String[] args) throws IOException{
        int t = readInt();
        while(t-->0){
            int n = readInt(), arr[] = new int[n];
            int max = Integer.MIN_VALUE, max1 = Integer.MIN_VALUE, idx = 0, idx1 = 0;
            Set<Integer>s = new HashSet();
            for(int i = 0; i<n; i++){
                arr[i] = readInt();
                s.add(arr[i]);
                if(arr[i]>=max){
                    max = arr[i];
                    idx = i;
                }
                if(arr[i]>max1){
                    max1 = arr[i];
                    idx = i;
                }
            }
            if(s.size()==1){
                println(-1);
                continue;
            }
            for(int i = 0; i<n; i++){
                if((i+1<n && arr[i]>arr[i+1]) || (i-1>=0 && arr[i]>arr[i-1])){
                    println(i+1);
                    break;
                }
            }
        }
    }
    static String next () throws IOException {
        while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(input.readLine().trim());
        return st.nextToken();
    }
    static long readLong () throws IOException {
        return Long.parseLong(next());
    }
    static int readInt () throws IOException {
        return Integer.parseInt(next());
    }
    static double readDouble () throws IOException {
        return Double.parseDouble(next());
    }
    static char readChar () throws IOException {
        return next().charAt(0);
    }
    static String readLine () throws IOException {
        return input.readLine().trim();
    }
    static void print(Object b) {
        System.out.print(b);
    }

    static void println(Object b) {
        System.out.println(b);
    }

    static void println() {
        System.out.println();
    }
}
