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 square{
  static int times=1;static List<Integer>[] adj;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
      int t=sc.nextInt();
      for(int p=1;p<=t;p++)
      {
       int n=sc.nextInt();
       int[] a=new int[n];
       for(int i=0;i<n;i++)a[i]=sc.nextInt();
int max=Integer.MIN_VALUE;int index=0;int count=0;
for(int i=0;i<n;i++)
{
  if(a[i]>max){count=1;max=a[i];}
  else if(a[i]==max)count++;
}
if(count==n){System.out.println("-1");continue;}
for(int i=0;i<n;i++)
{
if(a[i]!=max)continue;
if(i-1>=0 && a[i-1]<max){index=i;break;}
else if(i+1<n && a[i+1]<max){index=i;break;}
}
System.out.println(index+1);
      }
}
}