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 Main {

	public static final int mod=1000000007;	
	public static void main(String[] args) throws IOException {
		
		//File filein = new File("input.txt");
		//BufferedReader sc=new BufferedReader(new FileReader(filein));
		//PrintWriter out=new PrintWriter(new FileWriter("output.txt"));		

		//Scanner sc=new Scanner(System.in);
		BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out=new PrintWriter(System.out);		
		
		int t=Integer.parseInt(sc.readLine());
		
		while(t-->0) {
			
			int n=Integer.parseInt(sc.readLine());
			int[] arr=new int[n];
			String[] ip=sc.readLine().split(" ");
			int max=0;
			for(int i=0;i<n;i++){
				arr[i]=Integer.parseInt(ip[i]);
				max=Math.max(max, arr[i]);
			}
			int ans=-1;
			boolean got=false;
			for(int i=1;i<n-1;i++){
				if(arr[i]==max && (arr[i]>arr[i-1] || arr[i]>arr[i+1])){
					ans=i;
					got=true;
					break;
				}
			}

			if(got)
			out.println(ans+1);
			else{
				if(arr[0]==max && (arr[0]>arr[1])){
					ans=1;
				}
				if(arr[n-1]==max && (arr[n-1]>arr[n-2])){
					ans=n;
				}
				out.println(ans);
			}
			out.flush();
		}
		
		out.close();
		sc.close();
	}
	static boolean dfs(char[][] g,int i,int j,char sq){
		if(i==g.length-1 && j==g.length-1) return true;
		if(i>=g.length || j>=g.length || g[i][j]!=sq) return false;
		return dfs(g,i+1,j,sq) || dfs(g,i+1,j,sq);
	}
}