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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long n, m, a, b, c, k, temp, x, y;
const int MAXN = 1e5 + 11, mod = 1e9 + 7;
long long max(long long a, long long b) { return ((a > b) ? a : b); }
long long min(long long a, long long b) { return ((a > b) ? b : a); }
vector<long long> read(int n) {
  vector<long long> v(n);
  for (int i = 0; i < v.size(); i++) cin >> v[i];
  return v;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void sol(void) {
  cin >> n;
  vector<long long> v = read(n);
  set<int> s;
  for (auto x : v) s.insert(x);
  if (s.size() == 1) {
    cout << -1;
  } else {
    for (int i = 0; i < n; i++) {
      if (v[i] == *s.rbegin() &&
          (((i) && v[i - 1] < v[i]) || ((i != n - 1) && v[i + 1] < v[i]))) {
        cout << i + 1;
        break;
      }
    }
  }
  cout << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test = 1;
  cin >> test;
  for (int i = 1; i <= test; i++) sol();
}
