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 C{
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
        public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}
        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());}
        char[][] readCharArray(int n,int m) {
            String str;
            char[][] arr = new char[n][m];
            for(int i=0;i<n;i++) {
                str=nextLine();
                for(int j=0;j<n;j++) {
                    arr[i][j]=str.charAt(j);
                }
            }
            return arr;
        }
        char[][] readCharArray(int n){
            return readCharArray(n,n);
        }
        int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}
        long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}
        String nextLine(){String str = "";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}
    }
    static void printArray(int[] arr){
        for(int x:arr){
            System.out.print(x+" ");
        }
        System.out.println();
    }
    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);
	}
    public static void main(String[] args) throws NumberFormatException, IOException {
    	FastReader st = new FastReader();
        int tt = st.nextInt();
        int n,max;
        boolean test;
        while(tt-- > 0) {
        	max=0;
        	n=st.nextInt();
        	test=true;
        	int[] arr = new int[n];
        	for(int i=0;i<n;i++) {
        		arr[i]=st.nextInt();
        		max = Math.max(max, arr[i]);
        		if(i!=0) 
        			if(arr[i]!=arr[i-1]) 
        				test=false;
        	}
        	if(test) System.out.println("-1");
        	else {
        		for(int i=0;i<n;i++) {
        			if(arr[i]==max) {
        				if((i-1)>=0) {
        					if(arr[i-1]<max) {
        						System.out.println(i+1);break;
        					}
        				}if((i+1)<n) {
        					if(arr[i+1]<max) {
        						System.out.println(i+1);break;
        					}
        				}
        			}
        		}
        	}
        }
    }
}