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

public class Div_3_677_C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int[] arr = new int[n];
			ArrayList<Integer> maxIndex = new ArrayList<>();
			int max = Integer.MIN_VALUE;
			boolean same = true;
			for (int i = 0; i < n; i++) {
				arr[i] = sc.nextInt();
				if (arr[i] > max) {
					max = arr[i];
				}
				if (i != 0) {
					if (arr[i] != arr[i - 1]) {
						same = false;
					}
				}
			}
			for (int i = 0; i < n; i++) {
				if (arr[i] == max) {
					maxIndex.add(i);
				}
			}
			solve(arr, n, same, maxIndex);
		}
		sc.close();
	}

	private static void solve(int[] arr, int n, boolean same, ArrayList<Integer> maxIndex) {
		if (same) {
			System.out.println(-1);
			return;
		}

		for (int idx = 0; idx < maxIndex.size(); idx++) {
			int ai = maxIndex.get(idx);
			if (ai == 0) {
				if (arr[ai] > arr[ai + 1]) {
					System.out.println(ai + 1);
					return;
				}
			} else if (ai == n - 1) {
				if (arr[ai] > arr[ai - 1]) {
					System.out.println(ai + 1);
					return;
				}
			} else {
				if (arr[ai] > arr[ai + 1]) {
					System.out.println(ai + 1);
					return;
				}
				if (arr[ai] > arr[ai - 1]) {
					System.out.println(ai + 1);
					return;
				}
			}
		}
	}
}
