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;
long long int mod_Expo(long long int x, long long int n, long long int M) {
  if (x == 0) return 0;
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return mod_Expo((x * x) % M, n / 2, M);
  else
    return (x * mod_Expo((x * x) % M, (n - 1) / 2, M)) % M;
}
long long int binaryExponentiation(long long int x, long long int n) {
  if (x == 0) return 0;
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return binaryExponentiation(x * x, n / 2);
  else
    return x * binaryExponentiation(x * x, (n - 1) / 2);
}
long long int GCD(long long int A, long long int B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
bool prime_check(long long int x) {
  bool prime = (x >= 2);
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      prime = false;
      break;
    }
  }
  return prime;
}
long long int min1(long long int a, long long int b, long long int c) {
  vector<long long int> v1, v2, v3;
  v1.push_back(b);
  v1.push_back(c);
  v1.push_back(a);
  sort(v1.begin(), v1.end());
  return v1[0];
}
long long int min(long long int a, long long int b) {
  if (a <= b)
    return a;
  else
    return b;
}
long long int bin_search(long long int x, long long int low, long long int high,
                         vector<long long int> v1) {
  while (high > low) {
    long long int mid = low + (high - low) / 2;
    if (v1[mid] > x)
      high = mid;
    else
      low = mid + 1;
  }
  return high;
}
long long int digitsum(long long int n) {
  long long int sum = 0;
  while (n != 0) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, i, j, t,
      f = 0, g = 0, x, y, z, k, a = 0, b = 0, c = 0, q, x1, x2, y1, y2, x3,
      max2, min1 = 1000000, x4, sum, d, M = 998244353, r, p, sum1 = 0, sum2 = 0,
      sum3 = 0, sum4, sum5, max1 = 1000000000000000, sum6;
  cin >> t;
  while (t--) {
    cin >> n;
    long long int arr[n];
    set<long long int> s;
    max1 = 0;
    for (i = 0; i < n; i++) {
      cin >> x;
      arr[i] = x;
      s.insert(x);
      if (x >= max1) {
        z = i + 1;
        max1 = x;
      }
    }
    if (s.size() == 1)
      cout << -1 << endl;
    else {
      f = 0;
      for (i = 1; i < n - 1; i++) {
        if (arr[i] == max1) {
          if (arr[i] > arr[i - 1] || arr[i] > arr[i + 1]) {
            cout << i + 1 << endl;
            f = 1;
          }
        }
        if (f == 1) break;
      }
      if (f == 0) {
        if (arr[0] == max1 && arr[0] > arr[1])
          cout << 1 << endl;
        else if (arr[n - 1] == max1 && arr[n - 1] > arr[n - 2])
          cout << n << endl;
      }
    }
  }
}
