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 C {
	public static boolean[] isPrime;
	
	public static void main(String[] args) {
		FastScanner sc=new FastScanner();
		int t = sc.nextInt();
		while(t-->0) {
			int n = sc.nextInt();
			int ar[] = sc.readArray(n);
			int max = -1;
			for(int i : ar) {
				if(i>max)
					max = i;
			}
			int count = 0;
			int pos = -1;
			for(int i = 0; i<n; i++) {
				if(ar[i] == max) {
					count++;
					if((i<n-1 && ar[i]>ar[i+1]) || (i>0 && ar[i]>ar[i-1])){
						pos = i+1;
					}
				}
				
			}
			if(count==n || pos == -1)
				System.out.println("-1");
			else {
				System.out.println(pos);;
			}
		}
	}
	
	public static void fillPrime() {
		int n = 1000007;
		Arrays.fill(isPrime, true);
		isPrime[0] = isPrime[1] = false;
		for(int i = 2; i*i<n; i++) {
			if(isPrime[i]) {
				for(int j = i*i; j<n; j+=i) {
					isPrime[j] = false;
				}
			}
		}
	}
	
	static final Random random = new Random();
	
	static void sort(int[] a) {
		int n = a.length;
		for(int i =0; i<n; i++) {
			int val = random.nextInt(n);
			int cur = a[i];
			a[i] = a[val];
			a[val] = cur;
		}
		Arrays.sort(a);
	}
	
	static void sortl(long[] a) {
		int n = a.length;
		for(int i =0; i<n; i++) {
			int val = random.nextInt(n);
			long cur = a[i];
			a[i] = a[val];
			a[val] = cur;
		}
		Arrays.sort(a);
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (st == null  || !st.hasMoreTokens()) {
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		String nextLine() { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
		} 
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() { 
            return Double.parseDouble(next()); 
        } 
	}

}
