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;
void solve() {
  long long n;
  cin >> n;
  std::vector<long long> v;
  long long m = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
    m = max(m, x);
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (v[i] != m)
      continue;
    else if (i > 0 && v[i - 1] != m)
      ans = i + 1;
    else if (i < n - 1 && v[i + 1] != m)
      ans = i + 1;
  }
  if (ans == 0)
    cout << "-1";
  else
    cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t-- > 0) {
    solve();
    cout << "\n";
  }
  return 0;
}
