#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int inf = 1000000000000000000;
#pragma GCC optimize("-O3")
long long int gen() {
  long long int temp;
  cin >> temp;
  return temp;
}
long long int power(long long int a, long long int b, long long int m) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % m;
      b--;
    }
    a = (a * a) % m;
    b = b >> 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  long long int t;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<long long int> v(n);
    generate(v.begin(), v.end(), gen);
    set<long long int> st(v.begin(), v.end());
    if (st.size() == 1)
      cout << "-1\n";
    else {
      long long int ind = 0, mx = *max_element(v.begin(), v.end());
      for (long long int i = 0; i < n; i += 1) {
        if (i == 0) {
          if (v[i] == mx and v[i] > v[i + 1]) {
            ind = i;
            break;
          }
        } else if (i == n - 1) {
          if (v[i] == mx and v[i] > v[i - 1]) {
            ind = i;
            break;
          }
        } else {
          if (v[i] == mx and (v[i] > v[i + 1] or v[i] > v[i - 1])) {
            ind = i;
            break;
          }
        }
      }
      cout << ind + 1 << "\n";
    }
  }
  return 0;
}
