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;
long long M = 1000000007;
long long powM(long long b, long long p) {
  long long r = 1;
  for (; p; b = b * b % M, p /= 2)
    if (p & 1) r = r * b % M;
  return r;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (auto &x : a) cin >> x;
  map<long long, long long> m;
  m.clear();
  long long maxi = INT_MIN, t = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] >= maxi) {
      maxi = a[i];
      if (i == 0 && a[i + 1] < a[i]) t = i + 1;
      if ((i + 1) == n && a[i] > a[i - 1]) t = i + 1;
      if (a[i + 1] < a[i] || a[i - 1] < a[i]) t = i + 1;
    }
    m[a[i]]++;
  }
  if (m.size() == 1)
    cout << -1;
  else if (t == 0)
    cout << -1;
  else
    cout << t;
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tc = 1;
  cin >> tc;
  while (tc--) {
    solve();
    cout << endl;
  }
  return 0;
}
