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 C {

	public static void main(String[] args) throws IOException{
		try {
			FastScanner fs = new FastScanner();
			int t = fs.nextInt();
			while(t-->0)
			{
				int n =fs.nextInt();
				int a[]=new int[n];
				int max=0, flag=0;
				a[0] = fs.nextInt();
				for(int i=1;i<n;i++)
				{
					a[i]=fs.nextInt();
					max=Math.max(a[i], max);
					if(a[i]!=a[0])
						flag=1;
				}
				if(flag==0)
					System.out.println("-1");
				else
				{
					if(a[0]==max && a[1]!=max)
						System.out.println("1");
					else if(a[n-1]==max && a[n-2]!=max)
						System.out.println(n);
					else 
					{
						for(int i=1;i<n-1;i++)
						{
							if(a[i]==max && a[i-1]!=a[i+1] && (a[i-1]!=max || a[i+1]!=max))
							{
								System.out.println(i+1);
								break;
							}
						}
					}
				}
				
			
			}
				
		}
		catch (Exception e)
		{
			return;
		}
		
	}
	
	
	
	
		
	
	static class FastScanner 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastScanner() 
        { 
            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; 
        } 
    }
	
	

}
