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.Scanner;

public class Solution{
	
	static int fn(int[] ar){
		int num = Integer.MIN_VALUE;
		int ret = 0;
		int g = ar[0];
		boolean r = false;
		
		for(int i = 0; i < ar.length; i++) {
			if(ar[i] > num) {
				num = ar[i];
				ret = i;
			}
			if(g != ar[i]) {
				r = true;
			}
		}
		
		return r ? ++ret: -1;
	}
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for(int i = 0; i < t; i++){
			int n = sc.nextInt();
			int[] ar = new int[n];
			for(int x = 0; x < n; x++){
				ar[x] = sc.nextInt();
			}
			System.out.println(fn(ar));
		}
		sc.close();
	}
}