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.StringTokenizer;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class TaskC {
    static Reader rd=new Reader() ;
    static PrintWriter out=new PrintWriter(System.out) ;

    static class Reader
    {
        StringTokenizer stringTokenizer;
        BufferedReader bufferedReader;

        public Reader()
        {
            bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (stringTokenizer == null || !stringTokenizer.hasMoreElements())
            {
                try
                {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                }
                catch (Exception e){}
            }
            return stringTokenizer.nextToken();
        }

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

    static void solve(int T) throws IOException {
        while(T-->0){
			int n=rd.ni() ;
			int[] arr=new int[n] ;
			for(int i=0; i<n; ++i) arr[i]=rd.ni() ;
			
			boolean s=true ;
			int z=arr[0] ;
			for(int i=1; i<n; ++i) if(arr[i]!=z){s=false; break ;}
			
			if(!s){
				int mxv=Integer.MIN_VALUE, mxi=-1; 
			
			for(int i=0; i<n; ++i){
				if(mxv<=arr[i]){
					mxv=arr[i] ;
					mxi=i ;
				}
			}
			
			
			
			if((mxv==arr[n-1]))
			while(arr[mxi]==arr[mxi-1]){
				--mxi ;
			}
			
			++mxi ;
			
			out.println(mxi) ;
			}else{
				out.println(-1) ;
			}
			
			
		}

    }

    public static void main(String args[]) throws IOException {
        solve(rd.ni());
        out.flush();
    }
}
