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;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
  uniform_int_distribution<int> uid(0, lim - 1);
  return uid(rang);
}
int mpow(int base, int exp);
const int mod = 1000000007;
const int N = 3e5, M = N;
vector<int> g[N];
int a[N];
void solve() {
  int i = 0, j = 0, n, flag = 0, ans;
  cin >> n;
  long long arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  int ma = -1;
  vector<int> pos;
  for (i = 0; i < n; i++) {
    if (arr[i] > ma) {
      ma = arr[i];
    }
  }
  for (i = 0; i < n; i++) {
    if (arr[i] == ma) pos.push_back(i);
  }
  sort(pos.begin(), pos.end());
  long long l = pos.size();
  if (pos[0] == 0 && arr[1] < ma) {
    flag = 1;
    ans = 1;
  }
  if (flag == 0 && pos[l - 1] == (n - 1)) {
    if (arr[n - 2] < ma) {
      flag = 1;
      ans = n;
    }
  }
  if (flag == 0) {
    for (i = 0; i < l; i++) {
      if (arr[pos[i] - 1] < ma || arr[pos[i] + 1] < ma) {
        flag = 1;
        ans = i + 1;
        break;
      }
    }
  }
  if (flag == 1)
    cout << ans << endl;
  else
    cout << -1 << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
