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

public class DominantPiranha {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while (t-- > 0) {
            int N = in.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = in.nextInt();
            }
            int ans = findThePiranha(A, N);
            System.out.println(ans);
        }
        in.close();
    }

    public static int findThePiranha(int[] A, int N) {
        int max = -1;
        for (int i = 0; i < N; i++) {
            max = Math.max(max, A[i]);
        }
        for (int i = 0; i < N; i++) {
            if (A[i] == max) {
                if (i == 0) {
                    if (A[i] != A[i + 1]) {
                        return i + 1;
                    }
                } else if (i == N - 1) {
                    if (A[i] != A[i - 1]) {
                        return i + 1;
                    }
                } else {
                    if (A[i] != A[i + 1] || A[i] != A[i - 1]) {
                        return i + 1;
                    }
                }
            }
        }
        return -1;
    }
}