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

/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
import java.util.*;
public class Main
{
	public static void main(String[] args) 
	{
		Scanner s=new Scanner(System.in);
		int t=s.nextInt();
	
	    while(t--!=0)
	    {
	        
	        int n=s.nextInt();
	        LinkedList<Integer> l=new LinkedList<Integer>();
	        
	        int []arr=new int[n];
	        
	        for(int i=0;i<n;i++)
	        arr[i]=s.nextInt();
	        
	        l.addLast(arr[0]);
	       
	        int pos=1;
	        
	        for(int i=1;i<n;i++)
	        {
	            if(l.getLast()<arr[i])
	            {
	                pos=i+1;
	                l.removeLast();
	                l.add(arr[i]+1);
	            }
	            else if(l.getLast()==arr[i])
	            {
	                pos=i+1;
	                l.addLast(arr[i]);
	            }
	            else if(l.getLast()>arr[i])
	            {
	                
	               int p= l.getLast();
	               l.removeLast();
	               l.add(p+1);
	            }
	            
	        }
	        
	        Arrays.sort(arr);
	        
	        if(arr[0]==arr[n-1])
	        {
	            System.out.println(-1);
	        }
	        else
	        {
	            System.out.println(pos);
	        }
	        
	        
	    }
	    
		
		
	}
}












