#include <bits/stdc++.h>
using namespace std;
double log2(double n) { return log(n) / log(2); }
double ln(double n) { return log(n) / log(2.71828182846); }
void Heap(signed long long int A[], signed long long int n,
          signed long long int l, signed long long int r) {
  signed long long int x, i, j;
  x = A[l];
  i = l;
  while (1) {
    j = 2 * i;
    if (j > r) break;
    if (j < r && A[j + 1] >= A[j]) j++;
    if (x >= A[j]) break;
    A[i] = A[j];
    i = j;
  }
  A[i] = x;
}
void HeapSort(signed long long int A[], signed long long int n) {
  signed long long int l, r, temp;
  l = n / 2;
  while (l >= 0) {
    Heap(A, n, l, n - 1);
    l--;
  }
  r = n - 1;
  while (r >= 1) {
    temp = A[0];
    A[0] = A[r];
    A[r] = temp;
    r--;
    Heap(A, n, 0, r);
  }
}
int mini(int a, int b) {
  if (a > b) return b;
  return a;
}
int maxi(int a, int b) {
  if (a > b) return a;
  return b;
}
bool issimple(unsigned long long n) {
  for (unsigned long long i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
unsigned long long nod(unsigned long long a, unsigned long long b) {
  unsigned long long temp;
  while (b) {
    a %= b;
    temp = a;
    a = b;
    b = temp;
  }
  return a;
}
unsigned long long nok(unsigned long long a, unsigned long long b,
                       unsigned long long nod) {
  return a / nod * b;
}
int main() {
  long long int count, n, k, i, t = 1, j, m, x, y;
  char last;
  long long int max = 0, min = 0;
  bool yes, flag;
  cin >> t;
  int a[300003];
  while (t--) {
    cin >> n;
    count = -1;
    min = 1000000010;
    max = -1;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] < min) {
        min = a[i];
        x = i;
      }
      if (a[i] >= max) {
        max = a[i];
        y = i;
      }
    }
    if (n > 2) {
      count = -1;
      for (i = 0; i < n; i++) {
        if (a[i] == max) {
          if (i == 0) {
            if (a[1] < a[0]) {
              count = 1;
              break;
            }
          } else if (i == n - 1) {
            if (a[n - 1] > a[n - 2]) {
              count = n;
              break;
            }
          } else {
            if (a[i] > a[i - 1] || a[i] > a[i + 1]) {
              count = i + 1;
              break;
            }
          }
        }
      }
    } else {
      if (a[0] == a[1])
        count = -1;
      else if (a[0] > a[1])
        count = 1;
      else
        count = 2;
    }
    cout << count << endl;
  }
  return 0;
}
