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

public final class C {

    private static final FastReader fr = new FastReader();

    public static void main(String[] args) {
        int t = fr.nextInt();
        while (t-- > 0) {
            final int n = fr.nextInt();
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = fr.nextInt();
            }
            System.out.println(new C(a).solve() + 1); // 1 based
        }
        System.out.flush();
    }

    private final int[] a;

    public C(final int[] a) {
        this.a = a;
    }

    public int solve() {
        final List<Integer> m = maxes();
        for (int i = 0; i < m.size(); i++) {
            final int l = i == 0 ? -1 : m.get(i - 1),
                    r = i == m.size() - 1 ? -1 : m.get(i + 1),
                    c = m.get(i);

            final boolean ans;

            if (c == 0) { // Only check right
                ans = r == -1 || Math.abs(r - c) > 1;
            } else if (c == a.length - 1) { // Only check left
                ans = l == -1 || Math.abs(l - c) > 1;
            } else { // Check both left and right
                ans = (r == -1 || Math.abs(r - c) > 1) || (l == -1 || Math.abs(l - c) > 1);
            }

            if (ans) return c;
        }
        return -2;
    }

    private List<Integer> maxes() {
        int m = 0;
        for (int i = 1; i < a.length; i++) {
            if (a[i] > a[m]) m = i;
        }

        final List<Integer> maxes = new ArrayList<>();
        for (int i = 0; i < a.length; i++) {
            if (a[i] == a[m]) maxes.add(i);
        }

        return maxes;
    }

    private static final class FastReader {
        private final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        private StringTokenizer st;

        public String nextLine() {
            try {
                return br.readLine();
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }

}