#include <bits/stdc++.h>
using namespace std;
int tc;
void solve() {
  int n, mx = 0, x;
  vector<int> v;
  set<int> st;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    v.push_back(x);
    mx = max(mx, x);
    st.insert(x);
  }
  if (st.size() == 1) {
    cout << "-1" << endl;
  } else {
    for (int i = 0; i < n; i++) {
      if (v[i] == mx) {
        if ((i - 1 >= 0 && v[i - 1] < mx) || (i + 1 < n && v[i + 1] < mx)) {
          cout << i + 1 << endl;
          return;
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> tc;
  while (tc--) solve();
  return 0;
}
