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 power(int x, int y);
bool isPrime(int n);
int modInv(int a, int b);
int gcdExtended(int a, int b, int *x, int *y);
int mpower(int a, int b, int p);
bool sorted(vector<int> v, int n, int strict);
void go() {
  long long int n;
  cin >> n;
  std::vector<long long int> v(n);
  long long int minn = INT_MIN, maxx = INT_MAX, ace = -1;
  set<long long int> sett;
  for (long long int i = 0; i < n; i++)
    cin >> v[i], minn = max(v[i], minn), maxx = min(v[i], maxx),
                 sett.insert(v[i]);
  if (sett.size() == 1) {
    cout << "-1\n";
    return;
  }
  ace = -1;
  for (long long int i = 0; i < n - 1; i++) {
    if (!(v[i] ^ minn) and v[i + 1] < minn) {
      ace = i + 1;
      break;
    }
  }
  for (long long int i = 1; i < n; i++) {
    if (!(v[i] ^ minn) and v[i - 1] < minn) {
      ace = i + 1;
      break;
    }
  }
  if (v[1] == minn and v[0] < minn) {
    ace = 2;
  }
  cout << ace << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  cin >> t;
  while (t--) {
    go();
  }
}
int modInv(int a, int m) {
  int x, y;
  int g = gcdExtended(a, m, &x, &y);
  int res = (x % m + m) % m;
  return res;
}
int gcdExtended(int a, int b, int *x, int *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  int x1, y1;
  int gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
int mpower(int x, int y, int p) {
  int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int power(int x, int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  int p = sqrt(n);
  for (int i = 5; i <= p; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool sorted(vector<int> v, int n, int strict) {
  if (n <= 1) return 1;
  for (int i = 1; i < n; i++) {
    if (strict) {
      if (v[i] <= v[i - 1]) return 0;
    } else {
      if (v[i] < v[i - 1]) return 0;
    }
  }
  return 1;
}
