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