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 bahut_tezz() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void jai_bajrangbali() {
  long long c, d, e, n, k, x, y, z, cnt = 0, res = 0, mx = 1;
  long long sum = 0;
  bool ash = false;
  string s;
  long long maxi = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1] && a[i + 1] > maxi) {
      maxi = a[i + 1];
      cnt = i + 2;
    } else if (a[i] > a[i + 1] && a[i] > maxi) {
      maxi = a[i];
      cnt = i + 1;
    }
  }
  sort(a, a + n);
  if (a[0] == a[n - 1]) {
    cout << -1 << "\n";
    return;
  }
  cout << cnt << "\n";
}
int main() {
  bahut_tezz();
  long long t;
  cin >> t;
  while (t--) jai_bajrangbali();
  return 0;
}
