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.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static int a[] = new int[300000 + 5];
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		while(T -- > 0) {
			int n = sc.nextInt();
			int tmax = 0;
			for(int i = 1; i <= n; ++ i) {
				a[i] = sc.nextInt();
				tmax = Math.max(a[i], tmax);
			}
			int ans = -1;
			for(int i = 1; i <= n && ans == -1; ++ i) {
				if(a[i] != tmax) {
					if(i - 1 >= 1) ans = i - 1;
					else ans = i + 1;
				}
			}
			System.out.println(ans);
		}
	}

}
