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.*;
public class C {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-->0) {
			int n = sc.nextInt();
			sc.nextLine();
			String[] data = sc.nextLine().split(" ");
			
			int max = -1;
			int res = -1;
			for(int i = 0 ; i<data.length-1; i++) {
				if(!data[i].equals(data[i+1])) {
					int v = 0;
					int pos = -1;
					if(Integer.parseInt(data[i]) > Integer.parseInt(data[i+1])) {
						v = Integer.parseInt(data[i]);
						pos = i+1;
					}
					else {
						v = Integer.parseInt(data[i+1]);
						pos = i+2;
					}
					if( v > max) {
						max = v;
						res = pos;
					}
				}
			}
			System.out.println(res);
		}
	}
}
