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.ArrayList;
import java.util.Arrays;
import java.util.List;

public class C1433 {
    private StreamTokenizer in;
    private PrintWriter out;

    public int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    public String nextString() throws IOException {
        in.nextToken();
        return in.sval;
    }

    public C1433() {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
    }

    public static void main(String[] args) throws IOException {
        new C1433().solve();
    }

    public void solve() throws IOException {
        int t = nextInt();
        for (int i = 0; i < t; i++) {
            doWork();
        }
        out.flush();
    }

    private void doWork() throws IOException {
        int n = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }

        int min = 0;
        int max = 0;
        for (int i = 1; i < n; i++) {
            if (max == 0 && a[i] == max || a[i] > a[max]) max = i;
            if (a[i] < a[min]) min= i;
        }

        if (a[min] == a[max]) {
            out.println(-1);
        } else {
            out.println(max+1);
        }
        return;
    }
}
