#include <bits/stdc++.h>
int main(void) {
  int t;
  scanf("%i", &t);
  while (t--) {
    long long n;
    scanf("%lld", &n);
    long long max, maxIndex = 0;
    scanf("%lld", &max);
    int same = 1;
    for (long long i = 1; i < n; i++) {
      long long a;
      scanf("%lld", &a);
      if (a != max) same = 0;
      if (a > max) {
        max = a;
        maxIndex = i;
      } else if (a == max && same)
        maxIndex = i;
    }
    long long ans = (same) ? -1 : maxIndex + 1;
    printf("%lld\n", ans);
  }
}
