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.ByteArrayInputStream;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
import static java.lang.Math.min;
public class C {
  int USE_FILE = 0;
  int HAS_TESTCASES = 1;
  String INPUT = "6\n" + "5\n" + "5 3 4 4 5\n" + "3\n" + "1 1 1\n" + "5\n" + "4 4 3 4 4\n" + "5\n" + "5 5 4 3 2\n" + "3\n" + "1 1 2\n" + "5\n" + "5 4 3 5 5\n" + "";
  void solve(int caseNr) {
    int n = in.nextInt();
    int[] a = next_int_array(n);
    int first = a[0];
    int max = a[0];
    int min = first;
    int max_i = 0;
    for (int i = 1; i < n; i++) {
      if (a[i] > max) {
        max = a[i];
        max_i = i;
      }
      min = Math.min(min, a[i]);
    }
    if (max == min) {
      System.out.println(-1);
    } else {
      System.out.println(max_i + 1);
    }
  }
  public static int[] next_int_array(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++) {
      a[i] = in.nextInt();
    }
    return a;
  }
  static boolean LOCAL = java.lang.System.getProperty("ONLINE_JUDGE") == null;
  static Scanner in;
  static PrintWriter output_writer = new PrintWriter(java.lang.System.out);
  static class System {
    static PrintWriter out = null;
  }
  void setup() throws Exception {
    System.out = output_writer;
    if (LOCAL && USE_FILE == 0) {
      java.lang.System.setIn(new ByteArrayInputStream(INPUT.getBytes()));
      in = new Scanner(java.lang.System.in);
    }
    if (LOCAL && USE_FILE > 0) {
      String filename = String.format("in/cf%d.txt", USE_FILE);
      File inputFile = new File(filename);
      in = new Scanner(inputFile);
      System.out.printf("[%s]\n", filename);
    }
    if (!LOCAL) {
      in = new Scanner(java.lang.System.in);
    }
    long startTime = java.lang.System.currentTimeMillis();
    int t = HAS_TESTCASES > 0 ? in.nextInt() : 1;
    for (int i = 1; i <= t; i++) {
      solve(i);
    }
    in.close();
    if (LOCAL) {
      System.out.printf("[%dms]\n", java.lang.System.currentTimeMillis() - startTime);
    }
    output_writer.flush();
  }
  public static void main(String[] args) throws Exception {
    new C().setup();
  }
}
