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

/*
polyakoff
*/

public class Main {

    static FastReader in;
    static PrintWriter out;
    static int[] a = new int[322222];
    static class Pair {
        long a;
        int ind;

        Pair(long a, int ind) {
            this.a = a;
            this.ind = ind;
        }
    }

    static void solve() {
        int n = in.nextInt();
        int l = 0, r = 0, mx = 0;
        for(int i = 1; i <= n; i ++) {
            a[i] = in.nextInt();
            mx = Math.max(mx, a[i]);
        }
        HashSet<Integer> s = new HashSet<>();
        for(int i = 1; i <= n; i ++)
            s.add(a[i]);
        if(s.size()==1)
        {
            out.println(-1);
            return;
        }
        int ans = 0;
        for(int i = 1; i <= n; i ++)
        {
            if(a[i] != mx) continue;
            if(i - 1 > 0)
                if(a[i - 1] < a[i])
                {
                    ans = i;
                    break;
                }
            if(i + 1 <= n && a[i + 1] < a[i])
            {
                ans = i;
                break;
            }
        }
        out.println(ans);

//        Arrays.sort(arr, (o1, o2) -> Long.compare(o2.a, o1.a));

    }


    public static void main(String[] args) {
        in = new FastReader();
        out = new PrintWriter(System.out);
//        fileInputOutput();

        int T = 1;
        T = in.nextInt();
        while (T-- > 0)
            solve();

        out.flush();
        out.close();
    }

    static void fileInputOutput() {
        try {
            in = new FastReader("input.txt");
            out = new PrintWriter(new FileOutputStream("output.txt"));
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }

    static void runInThread() {
        Thread thread = new Thread(null, () -> {
            int T = 1;
//            T = in.nextInt();
            while (T-- > 0)
                solve();
        }, "thread1", 1 << 28);
        thread.start();
        try {
            thread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader() {
            this(System.in);
        }
        FastReader(String file) throws FileNotFoundException {
            this(new FileInputStream(file));
        }
        FastReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }
        String nextLine() {
            String line;
            try {
                line = br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}