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.BufferedReader;
import java.util.Scanner;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.math.BigInteger;
public class B 
{
	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static void pn(Object o) {
		out.println(o);
		out.flush();

	}

	static void p(Object o) {
		out.print(o);
		out.flush();
	}

	static void pni(Object o) {
		out.println(o);
		System.out.flush();
	}

	static int I() throws IOException {
		return sc.nextInt();
	}

	static long L() throws IOException {
		return sc.nextLong();
	}

	static double D() throws IOException {
		return sc.nextDouble();
	}

	static String S() throws IOException {
		return sc.nextLine();
	}

	static char C() throws IOException {
		return sc.next().charAt(0);
	}
	static int[] Ai(int n) throws IOException {
		int[] arr = new int[n];
		
		for (int i = 0; i < n; i++)
			arr[i] = I();
		
		return arr;
	}
	
	static String[] As(int n) throws IOException {
		String s[] = new String[n];
		
		for (int i = 0; i < n; i++)
			s[i] = S();
		
		return s;
	}
	
	static long[] Al(int n) throws IOException {
		long[] arr = new long[n];
		
		for (int i = 0; i < n; i++)
			arr[i] = L();
		
		return arr;
	}static long Max(long arr[]) {
		long max1 = 0;
		for (int i = 0; i < arr.length; i++) {
			max1 = Math.max(arr[i], max1);
		}
		return max1;
	}
	
	public static void process() throws IOException
	{
		int n=I();
		long a[]=Al(n);int  c=0;
		for(int i=1;i<n;i++)
	   {
		  if(a[i]==a[i-1])
		  {
			  c++;
		  }
	   }
		c=c+1;
		if(c==n)
		{
			pn(-1);
		}
		else
		{
		long max1=Max(a);
		boolean flag=true;int o=0;
		for(int i=0;i<n-1;i++)
		{
			if(a[i]==max1)
			{
				if(a[i]>a[i+1])
				{
					flag=false;
					o=i;
				}
			}
		}
		if(flag==true)
		{
			
				   for(int i=0;i<n;i++)
		   {
			   if(a[i]==max1)
			   {
				   pn(i+1);
				   break;
			   }
		   }
			
		}
		else
		{
			pn(o+1);
		}
		}
	}public static void main(String[] args) throws IOException {

		int t = I();
		while (t-- > 0)
			process();

	}
}
	