#include <bits/stdc++.h>
using namespace std;
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long N = 200005, INF = 2000000000000000000;
void solve() {
  int n;
  cin >> n;
  int* ar = new int[n];
  int m = 0;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    m = max(m, ar[i]);
  }
  int ans = -1;
  for (int i = 0; i < n; i++) {
    if (ar[i] == m) {
      if (i > 0 && ar[i - 1] < m) ans = i + 1;
      if (i < n - 1 && ar[i + 1] < m) ans = i + 1;
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
