#include <bits/stdc++.h>
using namespace std;
long long int tolong(const string &s) {
  stringstream ss;
  ss << s;
  long long int x;
  ss >> x;
  return x;
}
long long int power(long long int x, long long int y,
                    long long int p = 1000000007) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
void solve();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  int maxi = INT_MIN;
  int ans = -1;
  unordered_set<int> s;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    s.insert(v[i]);
    maxi = max(maxi, v[i]);
  }
  if (s.size() > 1) {
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] == maxi) {
        if (i == 0 && v[i] > v[i + 1]) {
          ans = i;
          break;
        } else if (i == v.size() - 1 && v[i] > v[i - 1]) {
          ans = i;
          break;
        } else if ((i != 0) && (i != v.size() - 1) &&
                   ((v[i] > v[i + 1] && v[i] >= v[i - 1]) ||
                    (v[i] >= v[i + 1] && v[i] > v[i - 1]))) {
          ans = i;
          break;
        }
      }
    }
    cout << ans + 1 << '\n';
  } else {
    cout << -1 << '\n';
  }
}
