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>
long long int mod = 1e9 + 7;
using namespace std;
const long long int INF = 1e18;
const long long int MAX = 1e4 + 5;
long long int power(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int num = 1;
  while (b != 1) {
    if (b % 2 == 0) {
      a *= a;
      b /= 2;
    } else {
      num *= a;
      b--;
    }
  }
  return (a * num);
}
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  set<long long int> s;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    s.insert(a[i]);
  }
  if (s.size() == 1) {
    cout << -1 << "\n";
    return;
  }
  long long int ma = *max_element(a, a + n);
  for (long long int i = 0; i < n; i++) {
    if (a[i] == ma) {
      long long int alp = 0;
      if (i + 1 < n && a[i + 1] < a[i]) alp = 1;
      if (i - 1 >= 0 && a[i - 1] < a[i]) alp = 1;
      if (alp) {
        cout << i + 1 << "\n";
        return;
      }
    }
  }
}
int32_t main() {
  long long int t;
  t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
