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;
const bool TEST = false;
const long double PI = 3.1415926535897932384626433832795;
const int inf = 2147483647;
const long long infll = 9223372036854775807;
const int mod = 1000000007;
long long max(int a, long long b) { return max((long long)a, b); }
long long min(int a, long long b) { return min((long long)a, b); }
long long min(long long a, int b) { return min(a, (long long)b); }
long long max(long long a, int b) { return max(a, (long long)b); }
long long dx[] = {0, 0, 1, -1};
long long dy[] = {1, -1, 0, 0};
long long dxk[] = {0, 0, 1, -1, 1, 1, -1, -1};
long long dyk[] = {1, -1, 0, 0, 1, -1, 1, -1};
bool isint(double d) { return (d == floor(d)); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long ipow(long long a, long long b) {
  if (a == 1 || b == 0) return 1;
  long long r = 1;
  for (long long i = 1; i <= b; i++) r *= a;
  return r;
}
long long power(long long a, long long b) {
  if (a == 1 || b == 0) return 1;
  long long c = power(a, b / 2);
  long long res = (c * c) % mod;
  ;
  if (b % 2) res = (res * (a % mod)) % mod;
  return res;
}
bool isPrime(int n) {
  if (n == 1) return false;
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
string toBase(int n, int b) {
  string oval = "";
  while (n >= 1) {
    if (n % b < 10)
      oval += to_string(n % b);
    else
      oval += 'A' + (n % b - 10);
    n /= b;
  }
  reverse(oval.begin(), oval.end());
  return oval;
}
void Solve() {
  int n;
  cin >> n;
  int a[n];
  for (long long i = 0; i <= n - 1; i++) cin >> a[i];
  int maxi = *max_element(a, a + n);
  int found = -1;
  for (long long i = 0; i <= n - 1; i++) {
    if (a[i] != maxi) continue;
    if (i > 0 && a[i - 1] < a[i]) {
      found = i + 1;
      break;
    } else if (i < n - 1 && a[i + 1] < a[i]) {
      found = i + 1;
      break;
    }
  }
  cout << found << '\n';
}
int main() {
  if (!TEST) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
  int t;
  cin >> t;
  while (t--) Solve();
  if (TEST) {
    cout << '\n';
    system("pause");
  }
  return 0;
}
