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;
vector<int> m;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    vector<int> d;
    vector<int> h;
    for (int j = 0; j < n; ++j) {
      int x;
      cin >> x;
      d.push_back(x);
      h.push_back(x);
    }
    bool u = false;
    int p = h[0];
    for (int j = 1; j < h.size(); ++j) {
      if (p != h[j]) {
        u = true;
        break;
      }
    }
    sort(d.begin(), d.end());
    int y = d[d.size() - 1];
    int otv = 0;
    for (int j = 0; j < h.size(); ++j) {
      if (h[j + 1]) {
        if (h[j] == y && h[j + 1] < h[j]) {
          otv = j + 1;
          break;
        }
      }
      if (h[j - 1]) {
        if (h[j] == y && h[j - 1] < h[j]) {
          otv = j + 1;
          break;
        }
      }
      if (h[j + 1] && h[j - 1]) {
        if (h[j] == y && (h[j + 1] < h[j] || h[j - 1] < h[j])) {
          otv = j + 1;
          break;
        }
      }
    }
    if (u && otv != 0) {
      m.push_back(otv);
    } else {
      m.push_back(-1);
    }
  }
  for (auto &i : m) {
    cout << i << "\n";
  }
  return 0;
}
