#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    int imHungry = 0;
    for (auto &it : a) {
      cin >> it;
      imHungry = max(imHungry, it);
    }
    int snacks = -1;
    for (int i = 0; i < n; ++i) {
      if (a[i] != imHungry) continue;
      if (i > 0 && a[i - 1] != imHungry) snacks = i + 1;
      if (i < n - 1 && a[i + 1] != imHungry) snacks = i + 1;
    }
    cout << snacks << endl;
  }
  return 0;
}
