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() {
  int n;
  cin >> n;
  vector<int> a(n);
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  int ans = -2;
  for (int i = 0; i < n; i++) {
    if (a[i] == mx) {
      bool ok = false;
      if (i > 0) ok |= a[i] > a[i - 1];
      if (i + 1 < n) ok |= a[i] > a[i + 1];
      if (ok) {
        ans = i;
        break;
      }
    }
  }
  cout << ans + 1 << '\n';
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int tt = 1;
  cin >> tt;
  while (tt--) solve();
  return 0;
}
