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

//package a;

import java.io.*;
import java.util.*;

public class A{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        in:while(t-->0){
            
            int n=sc.nextInt();
            long ans=-1;
            int a[]=new int[n];
            int max=0;
            for(int i=0;i<n;i++){
               a[i]=sc.nextInt();
               max=Math.max(a[i], max);
            }
            for(int i=1;i<n-1;i++){
                if(max==a[i]&&a[i]>a[i+1]){System.out.println(i+1);
                    continue in;
                }
                if(max==a[i]&&a[i]>a[i-1]){System.out.println(i+1);
                    continue in;
                }
                
                
            }
            if(a[0]>a[1]){System.out.println(1);
                    continue in;
                }
            if(a[n-1]>a[n-2]){System.out.println(n);
                    continue in;
                }
            
            System.out.println((ans)/(n/2));   
        }
        
    }
           
        //System.out.println();
         
}




