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

#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);
  }
}
