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;
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {-1, 1, 0, 0};
inline long long int gcd(long long int a, long long int b) {
  long long int r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
inline long long int fpow(long long int n, long long int k,
                          int p = 1000000007) {
  long long int r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
inline int inv(int a, int p = 1000000007) { return fpow(a, p - 2, p); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long i, j, k, n, m, p, q;
  long long int sum = 0;
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<long> v(n);
    long int mx = 0;
    int id = -1;
    set<long> st;
    for (i = 0; i < n; i++) {
      cin >> v[i];
      st.insert(v[i]);
      mx = max(mx, v[i]);
    }
    if (st.size() == 1)
      cout << -1 << "\n";
    else {
      for (i = 0; i < n; i++) {
        if (i == 0) {
          if (v[i] == mx && v[i + 1] < mx) {
            id = i;
            break;
          }
        } else if (i == n - 1) {
          if (v[i] == mx && v[i - 1] < mx) {
            id = i;
            break;
          }
        } else if (v[i] == mx && (v[i - 1] < mx || v[i + 1] < mx)) {
          id = i;
          break;
        }
      }
      cout << id + 1 << "\n";
    }
  }
}
