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.Arrays;
import java.util.Scanner;

public class Pirannha {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int testcases = sc.nextInt();
		sc.nextLine();

		for (int i = 0; i < testcases; i++) {
			int n = sc.nextInt();
			sc.nextLine();
			String array = sc.nextLine();
			int[] stream = Arrays.stream(array.split(" ")).mapToInt(Integer::parseInt).toArray();
			System.out.println(output(n, stream));
		}
	}

	private static int output(int n, int[] stream) {
		
		if (n == 0)
			return -1;
		
		if (n == 1)
			return 1;
		
		int max = 0;
		for (int i = 0; i < n; i++) {
			if (stream[i] > max)
				max = stream[i];
		}
		
		if (stream[0] == max && stream[1] < max){
			return 1;
		}
		
		for (int i = 1; i < n-1; i++) {
			if (stream[i] == max && (stream[i+1] < max || stream[i-1] < max))
						return (i+1);
		}
		
		if (stream[n-1] == max && stream[n-2] < max){
			return (n);
		}
		
		return -1;
		
	}
}
