#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
long long powmod(long long x, long long y, long long m) {
  long long ans = 1, r = 1;
  x %= m;
  while (r > 0 && r <= y) {
    if (r & y) {
      ans *= x;
      ans %= m;
    }
    r <<= 1;
    x *= x;
    x %= m;
  }
  return ans;
}
long long mul_inv(long long a, long long b) {
  long long b0 = b, t, q;
  long long x0 = 0ll, x1 = 1ll;
  if (b == 1ll) return 1ll;
  while (a > 1ll) {
    q = a / b;
    t = b, b = a % b, a = t;
    t = x0, x0 = x1 - q * x0, x1 = t;
  }
  if (x1 < 0ll) x1 += b0;
  return x1;
}
bool bdec(long long &x, long long &y) { return x > y; }
vector<vector<long long> > id(long long n) {
  vector<vector<long long> > temp;
  temp.resize(n);
  for (int i = 0; i < n; i++) {
    temp[i].resize(n);
    temp[i][i] = 1;
  }
  return temp;
}
vector<vector<long long> > mul(vector<vector<long long> > &x,
                               vector<vector<long long> > &y) {
  long long a = x.size(), b = x[0].size(), c = y.size(), d = y[0].size();
  vector<vector<long long> > ans;
  if (b != c) {
    cout << "invalid\n";
    exit(0);
  }
  ans.resize(a);
  for (int i = 0; i < a; i++) {
    ans[i].resize(d);
    for (int k = 0; k < b; k++) {
      for (int t = 0; t < d; t++) {
        ans[i][t] += x[i][k] * y[k][t];
        ans[i][t] %= 1000000007;
      }
    }
  }
  return ans;
}
vector<vector<long long> > powmat(vector<vector<long long> > x, long long n,
                                  long long m) {
  vector<vector<long long> > ans = id(x.size());
  while (n > 0) {
    if (n & 1ll) {
      ans = mul(ans, x);
    }
    x = mul(x, x);
    n >>= 1ll;
  }
  return ans;
}
const long long maxn = 2e5 + 2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long te;
  cin >> te;
  while (te--) {
    long long n;
    cin >> n;
    long long b[n];
    long long m = 0;
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      m = max(m, b[i]);
    }
    long long ch = 0;
    long long ans = -1;
    for (int i = 0; i < n; i++) {
      long long ne = i + 1, p = i - 1;
      if (b[i] != m) continue;
      if (ne < n && b[ne] < m) {
        ans = i + 1;
        break;
      }
      if (p >= 0 && b[p] < m) {
        ans = i + 1;
        break;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
