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, t, n, a, j, max;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> n;
    vector<long long> v;
    for (j = 0; j < n; j++) {
      cin >> a;
      v.push_back(a);
    }
    max = *max_element(v.begin(), v.end());
    for (j = 0; j < n; j++) {
      if (v[j] == max) {
        if ((j > 0 && v[j - 1] < v[j]) || (j < n - 1 && v[j + 1] < v[j]))
          goto end;
      }
    }
    cout << "-1" << endl;
  end:
    if (j < n) cout << j + 1 << endl;
  }
  return 0;
}
