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 long long inf = 1e18;
const int nax = 1e5 + 200;
const double mpi = acos(-1);
const double eps = 1e-10;
int dr[] = {1, -1, 0, 0, 1, -1, -1, 1};
int dc[] = {0, 0, 1, -1, 1, 1, -1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(20) << fixed;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    set<int> s;
    for (int i = 0; i < (int)n; ++i) {
      cin >> a[i];
      s.insert(a[i]);
    }
    if (((int)s.size()) == 1) {
      cout << -1 << '\n';
      continue;
    }
    int mx = *s.rbegin();
    for (int i = 0; i < (int)n; ++i) {
      if (a[i] != mx) continue;
      if (i - 1 >= 0 && a[i - 1] < a[i]) {
        mx = i;
        break;
      }
      if (i + 1 < n && a[i + 1] < a[i]) {
        mx = i;
        break;
      }
    }
    cout << mx + 1 << '\n';
  }
}
