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

public class Main 
{ 
	static class FastReader 
	{ 
		BufferedReader br; 
		StringTokenizer st; 

		public FastReader() 
		{ 
			try
			{
			    InputStream inputStream = new FileInputStream("input.txt");  
			    br = new BufferedReader(new
					InputStreamReader(inputStream));   
			}
			catch (FileNotFoundException ex)  
			{
			 //   System.out.println(ex);// insert code to run when exception occurs
			}
			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; 
		} 

		int [] nextArr(int n) {
    		int [] a = new int[n];
    		for(int i=0; i<n ; i++) 
				a[i] = nextInt();
    		return a;
    	}
	} 

	public static void main(String[] args) throws java.lang.Exception
	{ 
		FastReader sc = new FastReader();
		int t = sc.nextInt(); 
		
		while(t-->0){
			int n = sc.nextInt();
			int a[] = sc.nextArr(n);

			int ans = -1;
			int flag=0;
			for(int i=1; i<n; i++){
				if(a[i]!=a[i-1]){
					flag=1;
					break;
				}
			}

			if(flag==1){
				int max=-999, in=-1, prev=a[1];
				for(int i=0; i<n; i++){
					if(a[i]>max && a[i]!=prev){
						max=a[i];
						in = i+1;
					}
					prev=a[i];
				}
				ans = in;
			}

			System.out.println(ans);
		}
	} 
} 