#include <bits/stdc++.h>
using namespace std;
const int M = 300000 + 5;
int a[M];
int main() {
  a[0] = 1000 * 1000 * 1000;
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    a[n + 1] = 1000 * 1000 * 1000;
    cin >> a[1];
    bool nemishe = 1;
    int mx = a[1];
    for (int i = 2; i <= n; i++) {
      cin >> a[i];
      if (a[i] != a[i - 1]) {
        nemishe = 0;
      }
      mx = max(mx, a[i]);
    }
    if (nemishe) {
      cout << "-1\n";
      continue;
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] == mx && (a[i] > a[i - 1] || a[i] > a[i + 1])) {
        mx = i;
        break;
      }
    }
    cout << mx << '\n';
  }
  return 0;
}
