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 gfg{
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        while(t-->0){
            int n=sc.nextInt();
            int ar[]=new int[n];
            for(int i=0;i<n;i++)
            {
                ar[i]=sc.nextInt();
            }
            int max=ar[0],index=0;
            for(int i=1;i<n;i++)
            {
                if(ar[i]>max){
                    max=ar[i];
                    index=i;
                }
            }
            if(index!=0)
            System.out.println(index+1);
            else{
                if(ar[index+1]<max)
                System.out.println(index+1);
                else{  int y;
                    for( y=index+1;y<n-1;y++)
                    {
                        if(ar[y]>ar[y+1])
                        {
                        System.out.println(y+1);break;
                         }
                }
                if(y==n-1)
                System.out.println("-1");
            }
            
        } 
    }}
}