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;
const long long int INF = 1LL << 60;
const long long int N = 1e5 + 5;
long long int n, m, k, x, y, z, q;
int mod = 1e9 + 7;
long long int add(long long int a, long long int b) {
  if (a + b >= mod) return a + b - mod;
  return a + b;
}
long long int sub(long long int a, long long int b) {
  if (a < b) return a - b + mod;
  return a - b;
}
long long int mul(long long int a, long long int b) {
  return 1LL * a * b % mod;
}
long long int power(long long int a, long long int b) {
  if (b < 0) return 0;
  int re = 1;
  while (b) {
    if (b & 1) {
      re = mul(re, a);
    }
    a = mul(a, a);
    b >>= 1;
  }
  return re;
}
bool sortbysec(const pair<long long int, long long int> &a,
               const pair<long long int, long long int> &b) {
  return (a.second < b.second);
}
bool sortbyfi(
    const pair<long long int, pair<long long int, long long int>> &a,
    const pair<long long int, pair<long long int, long long int>> &b) {
  return (a.first > b.first);
}
const int mox[] = {+1, -1, +0, +0};
const int moy[] = {+0, +0, +1, -1};
priority_queue<pair<long long int, long long int>,
               vector<pair<long long int, long long int>>,
               greater<pair<long long int, long long int>>>
    ppq;
bool bs(long double xx) {
  long long int sb = xx / (x * y);
  long long int sb1 = xx / x;
  long long int sb2 = xx / y;
  if ((xx - sb1) < n or (xx - sb2) < m) return false;
  xx -= sb;
  long long int sum = m + n;
  return sum <= xx;
}
bool cmp1(std::pair<long long int, long long int> a,
          std::pair<long long int, long long int> b) {
  return a.second < b.second;
}
bool cmp2(std::pair<long long int, long long int> a,
          std::pair<long long int, long long int> b) {
  return a.second > b.second;
}
long long int dp[200005][3];
long long int a[200005];
long long int tipsy(long long int i, long long int taken) {
  if (i >= n) return 0;
  if (dp[i][taken] != -1) return dp[i][taken];
  long long int res = 0;
  if (i == 0 or a[i - 1] < a[i] and taken != 1) {
    res = 1 + tipsy(i + 1, taken);
  }
  if (taken == 0) {
    res = max(res, tipsy(i + 1, 1));
  } else if (taken == 1) {
    if (i - 2 >= 0) {
      if (a[i] > a[i - 2]) {
        res = max(res, 1 + tipsy(i + 1, 2));
      }
    } else {
      res = max(res, 1 + tipsy(i + 1, 2));
    }
  }
  return dp[i][taken] = res;
}
const int fox[] = {+1, +1, +0, -1, -1, +0};
const int foy[] = {+1, +0, -1, -1, +0, +1};
void Birdperson() {
  stack<long long int> stk;
  cin >> n;
  long long int a[n];
  long long int mx = -1;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  long long int cnt = 0;
  long long int idx = 0;
  for (int i = 0; i < (n); ++i)
    if (a[i] == mx) cnt++;
  if (cnt < n) {
    for (int i = 0; i < (n); ++i) {
      if (a[i] == mx) {
        if ((i > 0 and a[i] > a[i - 1]) or (i < n - 1 and a[i] > a[i + 1])) {
          cout << i + 1 << "\n";
          return;
        }
      }
    }
  } else
    cout << -1 << "\n";
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  long long int ct = 1;
  cin >> t;
  while (ct <= t) {
    Birdperson();
    ++ct;
  }
}
