#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int _ = 1; _ <= t; _++) {
    ll n;
    cin >> n;
    ll now;
    vector<ll> pn;
    for (int i = 1; i <= n; ++i) {
      cin >> now;
      pn.push_back(now);
    }
    ll maxn = *max_element((pn).begin(), (pn).end());
    ll minn = *min_element((pn).begin(), (pn).end());
    if (maxn == minn) {
      cout << -1 << '\n';
      continue;
    }
    ll ans = n;
    for (int i = 0; i < n; ++i) {
      if (i < n && pn[i] == maxn && pn[i] > pn[i + 1]) {
        ans = i + 1;
        break;
      }
      if (i > 0 && pn[i] == maxn && pn[i] > pn[i - 1]) {
        ans = i + 1;
        break;
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
