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;
const int mod = 1e9 + 7;
int powmod(int x, int y, int mod) {
  int res = 1;
  x %= mod;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  set<int> st;
  for (int i = 0; i < n; i++) st.insert(a[i]);
  if (st.size() == 1) {
    cout << -1 << "\n";
    return;
  }
  vector<int> maxSize;
  int largest = *max_element(a, a + n);
  for (int i = 0; i < n; i++) {
    int ptr = i;
    int currSize = a[i];
    int lptr = ptr - 1;
    while (lptr > 0) {
      if (currSize > a[lptr]) {
        currSize++;
        lptr--;
      } else {
        break;
      }
    }
    int rptr = ptr + 1;
    while (rptr < n) {
      if (currSize > a[rptr]) {
        currSize++;
        rptr++;
      } else {
        break;
      }
    }
    if (currSize > largest) {
      cout << ptr + 1 << "\n";
      return;
    }
  }
  cout << -1 << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t > 0) {
    solve();
    t--;
  }
  return 0;
}
