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 gcd(long long a, long long b) {
  if (a == 0 || b == 0 || a == b) return a == b ? a : (a > 0 ? a : b);
  return a > b ? gcd(b, a % b) : gcd(a, b % a);
}
bool isPrime(long long a) {
  long long c;
  for (c = 2; c <= a / 2; c++) {
    if (a % c == 0) return 0;
  }
  return 1;
}
bool isPalindrome(int n) {
  int t = n;
  queue<int> q;
  while (t) {
    q.push(t % 10);
    t /= 10;
  }
  while (!q.empty()) {
    t = t * 10 + q.front();
    q.pop();
  }
  return (t == n ? 1 : 0);
}
bool contains0(int n) {
  if (!n) return 1;
  bool b = 0;
  while (n) {
    if (n % 10 == 0) b = 1;
    n /= 10;
  }
  return b;
}
int digits(int n) {
  int c = 0;
  while (n) {
    c++;
    n /= 10;
  }
  return c;
}
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    int maxx = INT_MIN;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] > maxx) maxx = a[i];
    }
    int t = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] == maxx &&
          ((i + 1 < n && a[i + 1] < a[i]) || (i - 1 >= 0 && a[i - 1] < a[i]))) {
        cout << i + 1 << "\n";
        t = 1;
        break;
      }
    }
    if (t == 0) cout << -1 << endl;
  }
  return 0;
}
