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.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.*;  
  
public class codefo
{ 
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
 
    public int gcd(int a,int b)
    {
        return b==0?a:gcd(b,a%b);
    }
 
    public boolean isPrime(long n)
    {
        if(n==2)return true;
        int i=2;
        while(i*i<=n)
        {
            if(n%i==0) return false;
            i++;
        }
        return true;
    }
    
    public static long remove(long n)
    {
        long res=0;
        int ten=1;
        while(n>0)
        {
            long dig=n%10;
            n=n/10;
            if(dig>0)
            {
                res+=dig*ten;
                ten=ten*10;
            }
        }
        return res;
    }
  
    public static void main(String[] args) 
    {
        FastReader ob=new FastReader(); 
        	int t=ob.nextInt();
        	while(t-->0)
        	{
        		int n=ob.nextInt();
        		long a[]=new long[n];
        		long max=0;
        		int index=0;
        		for(int i=0;i<n;i++)
        		{
        			a[i]=ob.nextLong();
        			if(a[i]>max )
        				{
        					max=a[i];
        				}
        		}
        		int id=-1;
        		for(int i=0;i<n;i++)
        		{
        			if(a[i] != max)
        				continue;
        			if(i > 0 && a[i-1] != max)
        				id = i +1;
        			if(i < n-1 && a[i+1] != max )
        				id = i+1 ;
        		}
        		System.out.println(id);
        	}
	}
}
