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

public class Main {

    void solve(Scanner in, PrintWriter out) {
        int t = in.nextInt();
        for (int i = 0; i < t; ++i) {
            int n = in.nextInt();
            int[] arr = new int[n];
            int max = 0;
            int res = 0;
            boolean flag = true;

            for (int j = 0; j < n; ++j) {
                arr[j] = in.nextInt();
                max = Math.max(max, arr[j]);
                if (j > 0) {
                    if (arr[j] != arr[j - 1]){
                        flag = false;
                    }
                }
            }

            if (flag) {
                out.println(-1);
                continue;
            }

            if (arr[0] == max && arr[1] < max) {
                out.println(1);
                continue;
            }

            if (arr[n - 1] == max && arr[n - 2] < max) {
                out.println(n);
                continue;
            }

            for (int j = 1; j < n - 1; ++j) {
                if (arr[j] == max) {
                    if (arr[j - 1] < max || arr[j + 1] < max) {
                        res = j + 1;
                        break;
                    }
                }
            }
            out.println(res);
        }
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}
