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.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class DominantPiranha {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int casos = Integer.parseInt(br.readLine());
			while(casos-- > 0) {
				int posMayor = 0;
				long mayor = 0;
				long menor = (long)Math.pow(10, 9);
				int n = Integer.parseInt(br.readLine());
				int nums[] = new int[n];
				StringTokenizer st = new StringTokenizer(br.readLine());
				for(int i=0; i<n; i++) {
					nums[i] = Integer.parseInt(st.nextToken());
					if(nums[i] > mayor) {
						mayor = nums[i];
						posMayor = i;
					}else if(nums[i] == mayor && i < n-1) {
						posMayor = i;
					}
					if(nums[i] < menor) {
						menor = nums[i];					
					}
				}
				if(menor == mayor) {
					System.out.println("-1");
				}else {
					System.out.println(posMayor+1);
				}								
			}			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
