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