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 void println(Object o){
		System.out.println(o);
	}

	public static void main(String[] args){
		
		FastScanner sc = new FastScanner();
		int t = sc.nextInt();
		while(t-- > 0){
			int n = sc.nextInt(), a[] = new int[n], j = 0, max = -1;
			boolean flag = false;
			for(int i = 0; i<n; i+=1){
				a[i] = sc.nextInt();
				if(a[i] > max){
					max = a[i];
					j = i;
				}
			}
			if((a[0] == max) && (a[0] > a[1])){
				println(1);
				continue;
			}
			if((a[n-1] == max) && (a[n-1] > a[n-2])){
				println(n);
				continue;
			}
			for(int i = 1; i<n-1; i+=1){
				if((a[i] == max) && ((a[i] > a[i+1]) || (a[i] > a[i-1]))){
					println(i+1);
					flag = true;
					break;
				}
			}
			if(!flag){
				println(-1);
			}
		}
		
	}
}

class FastScanner {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = null;

		String nextLine(){
			String s = "";
			try{
				s = br.readLine();
			}
			catch(IOException e){
				e.printStackTrace();
			}
			return s;
		}

		String next(){
			while(st == null || !st.hasMoreTokens()){
				try{
					st = new StringTokenizer(br.readLine());
				}
				catch(IOException e){
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		
		int nextInt(){
		    return Integer.parseInt(this.next());
		}
		
		long nextLong(){
		    return Long.parseLong(this.next());
		}

}
