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;
int main() {
  long long i, j, t;
  cin >> t;
  while (t--) {
    long long n, a, mx = INT_MIN, p;
    cin >> n;
    map<long long, long long> m;
    vector<long long> v(n);
    for (i = 0; i < n; i++) {
      cin >> a;
      v[i] = a;
      if (a >= mx) {
        mx = a;
      }
      m[a]++;
    }
    if (m.size() == 1)
      cout << "-1\n";
    else {
      for (i = 0; i < n; i++) {
        if (mx == v[i]) {
          if (i == 0) {
            if (v[i + 1] != mx) {
              p = i + 1;
              break;
            }
          } else if (i == n - 1) {
            if (v[i - 1] != mx) {
              p = i + 1;
              break;
            }
          } else if (v[i + 1] != mx) {
            p = i + 1;
            break;
          } else if (v[i - 1] != mx) {
            p = i + 1;
            break;
          }
        }
      }
      cout << p << "\n";
    }
  }
}
