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.lang.*;
import java.io.*;
public class Main
{
    // static Scanner sc=new Scanner(System.in);
    static FastReader sc=new FastReader(); 
	public static void main (String[] args) throws java.lang.Exception
	{
        Writer w=new PrintWriter(System.out);
		int t=sc.nextInt();
		while(t-->0){
		    int n=sc.nextInt();
		    long ans=-1;
		    long[] a=new long[n];long[] b=new long[n];
		    scan(n,a);
		    for(int i=0;i<n;i++){
		        b[i]=a[i];
		    }
		    Arrays.sort(a);
		    if(a[0]==a[n-1])ans=-1;
		    else{
		        ans=a[n-1];
		    }
		    if(ans!=-1){
		        for(int i=0;i<n;i++){
    		        if(b[i]==ans){
    		            if(i>0 && b[i-1]<b[i]){ans=i;break;}
    		            if(i<n-1 && b[i+1]<b[i]){ans=i;break;}
    		        }
    		    }
		    }
		    if(ans!=-1)ans++;
		  System.out.println(ans);
		}
		w.flush();
		w.close();
	}
	static int min(int a,int b){
	    return Math.min(a,b);
	}
	static int min3(int a,int b, int c){
	    return Math.min(Math.min(a,b),c);
	}
	static int max(int a,int b){
	    return Math.max(a,b);
	}
	static int max3(int a,int b, int c){
	    return Math.max(Math.max(a,b),c);
	}
	static void scan(int n,long[] a){
	    for(int i=0;i<n;i++){
	        a[i]=sc.nextLong();
	    }
	}
	static void print(int[] a){
	    int n=a.length;
	    for(int i=0;i<n;i++){
	        System.out.print(a[i]+" ");
	    }
	}
}
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()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }