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>
using namespace std;
template <typename T>
T Sqr(T x) {
  T n = x * x;
  return n;
}
template <typename T>
T Pow(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * Pow(B, P - 1);
  else
    return Sqr(Pow(B, P / 2));
}
template <typename T>
T Abs(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
T Gcd(T a, T b) {
  if (a < 0) return Gcd(-a, b);
  if (b < 0) return Gcd(a, -b);
  return (b == 0) ? a : Gcd(b, a % b);
}
template <typename T>
T Lcm(T a, T b) {
  if (a < 0) return Lcm(-a, b);
  if (b < 0) return Lcm(a, -b);
  return a * (b / Gcd(a, b));
}
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
inline string ToBinary(T n) {
  string r;
  while (n != 0) {
    r = (n % 2 == 0 ? "0" : "1") + r;
    n >>= 1;
  }
  return r;
}
long long BinaryToDecimal(string s) {
  int len = s.size();
  long long n = 0, p = 1;
  for (int i = len - 1; i >= 0; i--, p *= 2) n += p * (s[i] - '0');
  return n;
}
int Strtoint(string str) {
  stringstream second(str);
  int x = 0;
  second >> x;
  return x;
}
string Intostr(int x) {
  stringstream second;
  second << x;
  string str = second.str();
  return str;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, i, j;
    cin >> n;
    vector<long long> v(n + 5);
    long long mx = 0;
    for (int i = 0; i < (n); i++) {
      cin >> v[i];
    }
    mx = *max_element(v.begin(), v.end());
    long long res = -1;
    for (int i = 1; i < n; i++) {
      if (v[i - 1] == mx and v[i - 1] > v[i]) {
        res = i;
        break;
      } else if (v[i] == mx and v[i] > v[i - 1]) {
        res = i + 1;
        break;
      }
    }
    cout << res << endl;
  }
  return 0;
}
