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 codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner scan=new Scanner(System.in);
		int t=scan.nextInt();
		for(int k=0;k<t;k++){
		    int n=scan.nextInt();
		    int[] a=new int[n];
		    int max=0;
		    for(int i=0;i<n;i++){
		        a[i]=scan.nextInt();
		        max=Math.max(max,a[i]);
		    }
		    int ans=-1;
		    for(int i=0;i<n-1;i++){
		        if(a[i]==max&&a[i+1]!=max){
		            ans=i+1;
		        }
		    }
		    if(a[n-1]==max&&a[n-2]!=max){
		        ans=n;
		    }
		    System.out.println(ans);
		}
		
	}
}
