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.Scanner;
public class Main {

	public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int tc = sc.nextInt();
	  while(tc-->0) {
		  int n =sc.nextInt();
		  long ar[] = new long[n];
		  int index=-1;
		  long max = Long.MIN_VALUE;
		  if(ar[0]>ar[1]) {
			  index=1;
			  max=ar[0];
		  }
		  for(int i=0;i<n;i++) ar[i] = sc.nextLong();
		  for(int i=1;i<n-1;i++) {
			  if((ar[i]>ar[i+1] || ar[i]>ar[i-1] )&& ar[i]>=max) {
				  if(ar[i+1]<ar[index+1] && index>-1) {
					continue;
				  }
				  else {
				  max=ar[i];
				  index=i;
				  }
				  
			  }
			  if(ar[i]>ar[i-1] && ar[i]>max) {
				  if(ar[i-1]<ar[index-1] && index>-1) {
					  continue;
				  }
				  else {
					  max=ar[i];
					  index=i;
				  }
			  }
		  }
		  if(ar[n-1]>ar[n-2] && ar[n-1]>max) index=n;
		  if(index!=-1 && index!=n)
		    System.out.println(index+1);
		  else if(index==n)
			  System.out.println(n);
		  else System.out.println(-1);
	  }
	  sc.close();

	}
	 static int gcd(int a, int b) {
		 if(b==0) return a;
		 else return gcd(b,a%b);
	 }

}