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.io.*;
 
public class Solution {
 
    private static FastReader in = new FastReader();
    public static void main(String[] args) throws Exception {
        int t = in.nextInt();
        while (t-- > 0) {
            solve();
        }
    }
 
    static void solve() {
        int n = in.nextInt();
        long[] a = new long[n];
        long max = 0;
        for(int i=0; i<n; i++){
            a[i] = in.nextLong();
            max = Math.max(a[i], max);
        }
        for(int i=0; i<n; i++){
            if(max == a[i]){
                if(i<n-1 && a[i] > a[i+1]){
                    System.out.println(i+1);
                    return;
                }
                if(i > 0 && a[i] > a[i-1]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        System.out.println(-1);        
        
    }
 
    
}
 
 
 
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 nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}