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 boring
{
	public static void main(String args[]) throws IOException
	{
		try{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int t=0;
		t=Integer.parseInt(br.readLine());
		while(t-->0)
		{
			int n=0;
			n=Integer.parseInt(br.readLine());
			String b[]=br.readLine().split(" ");
			HashMap<Long,Integer> map=new HashMap<Long,Integer>();
			long arr[]=new long[n];
			for(int i=0;i<n;i++)
			{
				arr[i]=Long.parseLong(b[i]);
				map.put(arr[i],i+1);
			}
			if(map.size()==1)
			{
				System.out.println("-1");
			}
			else
			{
			Arrays.sort(arr);
			System.out.println(map.get(arr[arr.length-1]));}
	}}
	catch(Exception e){}
}}