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() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    vector<int> pasa;
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      pasa.push_back(x);
    }
    if (*min_element(pasa.begin() + 1, pasa.end()) ==
        *max_element(pasa.begin(), pasa.end())) {
      cout << -1 << "\n";
      continue;
    }
    for (int i = 0; i < n; i++) {
      if (pasa[i] == *max_element(pasa.begin(), pasa.end())) {
        if (i == 0) {
          if (pasa[i + 1] < pasa[i]) {
            cout << i + 1 << "\n";
            break;
          }
        } else if (i == n - 1) {
          if (pasa[i - 1] < pasa[i]) {
            cout << i + 1 << "\n";
            break;
          }
        } else {
          if (pasa[i - 1] < pasa[i] || pasa[i + 1] < pasa[i]) {
            cout << i + 1 << "\n";
            break;
          }
        }
      }
    }
  }
  return 0;
}
