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 Bitcheck {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner a = new Scanner(System.in);
		int t = a.nextInt();
		for(int i = 0; i < t; i++) {
			boolean flag = false;
			int max = Integer.MIN_VALUE;
			
			int n = a.nextInt();
			int[] array = new int[n];
			int max_i = 0;
			
			for(int j = 0; j < n; j++) {
				array[j] = a.nextInt();
				if(array[j] > max) {
					max = array[j];
					max_i = j;
				}
			}
			for(int j = 0; j < n; j++) {
				if(array[j] != max) {
					flag = true;
					break;
				}
			}
			if(flag) System.out.println(max_i);
			else System.out.println(-1);
		}
	a.close();
	}

}
