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;
using ll = long long;
void solve() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  int maximum = *max_element(vec.begin(), vec.end());
  for (int i = 0; i < n; i++) {
    if (vec[i] == maximum) {
      if ((i > 0 && vec[i - 1] != maximum) ||
          (i < n - 1 && vec[i + 1] != maximum)) {
        cout << i + 1 << "\n";
        return;
      }
    }
  }
  cout << "-1\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
