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.*;
public class DominantPiranha {
    

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-- > 0)
        {
            int num = sc.nextInt();
            int num1 = num;
            int[] arr = new int[num];
            for(int i = 0; i < num; i++)
            {
                arr[i] = sc.nextInt();
            }
            int[] arrn = new int[num];
            for(int i = 0; i < num; i++)
            {
                arrn[i] = arr[i];
            }
            
            
            Arrays.sort(arrn);
            if(arrn[0] == arr[num - 1])
            {
                System.out.println(-1);
                continue;
            }
            int output = 0;
            for(int i = 0; i < num; i++)
            {
                if(arrn[num1 - 1] == arr[i])
                {
                    if(i == 0)
                    {
                        
                        if(arr[i] > arr[i + 1])
                        {
                            output = i+1;
                            break;
                        }
                         num1--;
                    }
                    else if(i == num - 1)
                    {
                        if(arr[i] > arr[i - 1])
                        {
                            output = i+1;
                            break;
                        }
                         num1--;
                    }
                    else
                    {
                        if(arr[i] > arr[i - 1] || arr[i] > arr[i + 1])
                        {
                            output = i+1;
                            break;
                        }
                        num1--;
                        
                    }
                    
                    
                }
                
            }
            System.out.println(output);
            
            
            
            
        }
           
            
    }
    
}
