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 Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int t = scn.nextInt();
		while (t > 0) {
			int n = scn.nextInt();
			int[] arr = new int[n];
			arr[0] = scn.nextInt();
			int max = arr[0], count = 1;
			for (int i = 1; i < n; i++) {
				arr[i] = scn.nextInt();
				max = Integer.max(max, arr[i]);
				if (arr[0] == arr[i])
					count++;
			}
			if (count == n) {
				System.out.println(-1);
			} else {
				int i = 0;
				for (i = 0; i < arr.length - 1; i++) {
					if (arr[i] == max && arr[i + 1] != max) {
						System.out.println(i + 1);
						break;
					}
				}
				if (i == arr.length - 1 && arr[i] == max)
					System.out.println(i + 1);
			}
			t--;
		}
	}
}
