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

//package dataStructures;

import java.util.*;
import java.lang.*;
import java.io.*;
public class test2
 {
	
	public static void main (String[] args) throws IOException
	 {
		FastReader sc = new FastReader();
		int t = sc.nextInt();
		StringBuffer ans = new StringBuffer("");
		while(t-->0) {
			int n = sc.nextInt();
			long[] arr = new long[n];
			long ind=-1,max = Long.MIN_VALUE;
			for(int i=0;i<n;i++) {
				arr[i] = sc.nextInt();
				max = Math.max(max, arr[i]);
			}
			for(int i=0;i<n;i++) {
				if(arr[i]==max) {
					if(i>0&&max>arr[i-1]||i+1<n&&max>arr[i+1]) {
						ind = i+1;
						break;
					}
				}
			}
			ans.append(ind+"\n");
		}
		System.out.println(ans);
	}
	  static 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; 
	        } 
	    } 
}