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;
const int IQ = 3 * 100000;
int a[IQ], mxs[IQ];
void output() {
  int n;
  cin >> n;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > mx) mx = a[i];
  }
  bool ok = false;
  for (int i = 0; i < n; i++) {
    if (a[i] == mx) {
      if ((i - 1 >= 0 && a[i - 1] < a[i]) || (i + 1 < n && a[i + 1] < a[i])) {
        cout << i + 1 << "\n";
        ok = true;
        break;
      } else if (!i && a[i + 1] < a[i]) {
        cout << i + 1 << "\n";
        ok = true;
        break;
      } else if (i == n - 1 && a[i - 1] < a[i]) {
        cout << i + 1 << "\n";
        ok = true;
        break;
      }
    }
  }
  if (!ok) cout << "-1\n";
}
int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int internalTests = 1;
  cin >> internalTests;
  while (internalTests--) output();
}
