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;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int MOD = 1e9 + 7;
const int MAX = 2e9;
const double PI = acos(-1);
int A[300010];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<int> v;
    int mx = 0;
    for (int i = 1; i <= n; i++) {
      cin >> A[i];
      if (mx < A[i]) {
        mx = A[i];
        v.clear();
        v.push_back(i);
      } else if (mx == A[i]) {
        v.push_back(i);
      }
    }
    A[0] = A[n + 1] = MAX;
    int ans = -1;
    for (int a : v) {
      if (A[a] > min(A[a - 1], A[a + 1])) {
        ans = a;
        break;
      }
    }
    cout << ans << '\n';
  }
}
