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.*;
import java.math.*;
import java.io.*;

public class B{
	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 static void main(String[] args){
		FastReader in = new FastReader(); 
		boolean debug = false;
		int t = in.nextInt();
		for(int q = 0; q < t; q++){
			int n = in.nextInt();
			int arr[] = new int[n];
			arr[0] = in.nextInt();
			int max = arr[0];
			boolean b = true;
			for(int i = 1; i < n; i++){
				arr[i] = in.nextInt();
				if(arr[i] != arr[i - 1]){
					b = false;
				}
				max = Math.max(max, arr[i]);
			}

			if(n == 1){
				System.out.println("1");
				continue;
			}
			if(b){
				System.out.println("-1");
			}
			else{
				int ind = 1;
				// System.out.println(max);
				for(int i = 1; i < n; i++){
					if(arr[i] == max){
						if(arr[i - 1] < max){
							ind = i + 1;
							break;
						}
						if(i + 1 < n && arr[i + 1] < max){
							ind = i + 1;
							break;
						}
					}
				}
				System.out.println(ind);
			}
		}
	}

	
}


