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

public class Solution {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
		int t = scan.nextInt();
		StringBuilder result = new StringBuilder();
		for(int i = 0; i < t; i++) {
			int n = scan.nextInt();
			List<Elem> elems = new ArrayList<>();
			for(int j = 0; j < n; j++) {
				elems.add(new Elem(j, scan.nextInt()));
			}
			Collections.sort(elems);
			int res = (elems.get(n-1).w == elems.get(0).w) ? -1 : (elems.get(0).index + 1);
			result.append(res + "\n");
		}
		System.out.println(result);
    }		
}

class Elem implements Comparable {
	public int index;
	public int w;
	
	public Elem(int index, int w) {
		this.index = index;
		this.w = w;
	}
	
	public int compareTo(Object o) {
		Elem other = (Elem) o;
		return other.w - w;
	}
	
	public String toString() {
		return "(" + this.index + ", " + this.w + ")";
	}
}