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 code3
{
  public static void main(String[] args)
  { 
    Scanner sc = new Scanner(System.in);
    int T = sc.nextInt();
    while(T-->0)
    {
      int n = sc.nextInt();
      int[] a = new int[n];
      int maximum=0,minimum=1000000000;
      for(int i = 0; i < n; i++)
      {
        a[i] = sc.nextInt();
        if(maximum < a[i])
          maximum = a[i];
        if(minimum > a[i])
           minimum = a[i];
      }
      int ind=0;
      if(minimum == maximum)
        ind = -1;
      else
      {
        if(a[0]==maximum)
        {
          for(int k=1;k<=n-1;k++)
          {
            if(a[k]!=maximum)
            {
             ind = k;
             break;
            }
          }
        }
        else
        {
        for(int i=0;i<=n-1;i++)
        {
          if(a[i]==maximum)
          {
            ind = i+1;
            break;
          }
        }
        }
      }
      System.out.println(ind);
    }
  }
}