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

//package Contest677;
import java.util.Scanner;
public class C {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int tc = 0; tc < t; tc++) {
            int n = sc.nextInt();
            int[] A = new int[n];
            for (int i = 0; i < n; i++) {
                A[i] = sc.nextInt();
            }
            int max = -1;
            for (int i = 0; i < n; i++) {
                if (A[i] > max) {
                    max = A[i];
                }
            }
            int index = -1;
            for (int i = 0; i < n; i++) {
                if (A[i] == max) {
                    if ((i > 0 && A[i-1] < max) || (i < n - 1 && A[i + 1] < max)) {
                        index = i + 1;
                        break;
                    }
                }
            }
            System.out.println(index);
        }
    }
}
