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