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.lang.*;
import java.io.*;

public class Main{

    static final FastReader in = new FastReader();
    static final FastWriter out = new FastWriter();

    public static void main(String[] args) throws IOException{
        int tc = in.nextInt();
        while (tc-- > 0){
            int n = in.nextInt();
            int[] a = new int[n];
            int maxN = 0, maxC = 0, ans = 0;
            for (int i = 0; i < n; i++){
                a[i] = in.nextInt();
                maxN = Math.max(maxN, a[i]);
            }
            for (int i = 0; i < n; i++){
                if (a[i] == maxN) maxC++;
            }
            if (maxC == n) ans = -1;
            else{
                for (int i = 0; i < n; i++){
                    if (a[i] == maxN){
                        if (i==0){
                            if (a[i+1] != maxN)
                                ans = i+1;
                        }else if (i==n-1){
                            if (a[i-1] != maxN)
                                ans = i+1;
                        }else{
                            if (a[i-1] != maxN || a[i+1] != maxN)
                                ans = i+1;
                        }
                    }
                }
            }
            System.out.println(ans);
        }

        out.close();
    }
}
class Pair implements Comparable<Pair>{
    int first, second;
    Pair(int a, int b){
        this.first = a;
        this.second = b;
    }
    public int compareTo(Pair o){
        return o.first - first;
    }
}
class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in)); 
    } 
    String next(){ 
        while (st == null || !st.hasMoreElements()) { 
            try{ 
                st = new StringTokenizer(br.readLine()); 
            }catch (IOException  e){ 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 
    int nextInt(){ 
        return Integer.parseInt(next()); 
    } 
    long nextLong(){ 
        return Long.parseLong(next()); 
    } 
    double nextDouble(){ 
      return Double.parseDouble(next()); 
    }
    String nextString(){
        return next().trim();
    }
    String nextLine(){ 
        String str = ""; 
        try{ 
            str = br.readLine(); 
        } 
        catch (IOException e){ 
            e.printStackTrace(); 
        } 
        return str; 
    }
}
class FastWriter{
    PrintWriter out;
    FastWriter(){
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	out.flush();
    }
    void pl(Object o){
        out.write(o.toString());
	    out.write("\n");
        out.flush();
    }
    void pl(){
        out.write("\n");
        out.flush();
    }
    void p(Object o){
        out.write(o.toString());
        out.flush();
    }
    void close(){
        out.flush();
        out.close();
    }  
}
