#include <bits/stdc++.h>
using namespace std;
int main() {
  long T;
  scanf("%ld", &T);
  for (int t = 0; t < T; t++) {
    long n;
    scanf("%ld", &n);
    long arr[n];
    for (long i = 0; i < n; i++) scanf("%ld", &arr[i]);
    long min = *min_element(arr, arr + n), max = *max_element(arr, arr + n);
    if (min == max)
      printf("-1\n");
    else {
      if (arr[0] == max && arr[1] != max)
        printf("1\n");
      else if (arr[n - 1] == max && arr[n - 2] != max)
        printf("%ld\n", n);
      else {
        long i;
        for (i = 1; i < n - 1; i++) {
          if (arr[i] == max && (arr[i - 1] != max || arr[i + 1] != max)) break;
        }
        printf("%ld\n", i + 1);
      }
    }
  }
  return 0;
}
