#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long int ans = 0;
    vector<long long int> a;
    for (int i = 0; i < n; i++) {
      long long int x;
      cin >> x;
      a.push_back(x);
    }
    long long int k = *max_element(a.begin(), a.end());
    for (int i = 0; i < n; i++) {
      if (i == 0) {
        if (a[i] == k && a[i + 1] != k) {
          ans = i + 1;
          break;
        }
      } else if (i == (n - 1)) {
        if (a[i] == k && a[i - 1] != k) {
          ans = i + 1;
          break;
        }
      } else {
        if (a[i] == k) {
          if (a[i + 1] != k || a[i - 1] != k) {
            ans = i + 1;
            break;
          }
        }
      }
    }
    if (ans == 0) {
      cout << "-1" << endl;
    } else {
      cout << ans << endl;
    }
  }
  return 0;
}
