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;
int f(int n) { return (n == 1 || n == 0) ? 1 : f(n - 1) * n; }
int a(int n, int k) { return f(n) / (f(k) * f(n - k)); }
int main() {
  int t;
  int n;
  cin >> t;
  int res[t];
  int s = 0;
  for (int k = 0; k < t; k++) {
    int n;
    cin >> n;
    int a[n];
    int itr = 0;
    bool eat = false;
    for (int w = 0; w < n; w++) {
      cin >> a[w];
      if (w == n) {
        if (a[itr] < a[n]) {
          itr = n;
          if (a[itr - 1] < a[itr]) {
            eat = true;
          } else {
            eat == false;
          }
        }
        if (a[itr] < a[0]) {
          itr = 0;
          if (a[0] > a[1]) {
            eat = true;
          } else {
            eat == false;
          }
        }
      } else {
        if (a[itr] < a[w]) {
          itr = w;
          if (a[itr - 1] < a[itr] || a[itr] > a[itr + 1]) {
            eat = true;
          } else {
            eat == false;
          }
        } else if (a[itr] == a[w] && eat == false) {
          if (a[w - 1] < a[w] || a[w] > a[w + 1]) {
            eat = true;
          }
        }
      }
    }
    if (a[itr] < a[0]) {
      itr = 0;
      if (a[0] > a[1]) {
        eat = true;
      }
    }
    if (a[itr] < a[n]) {
      itr = n;
      if (a[n] > a[n - 1]) {
        eat = true;
      }
    }
    if (eat) {
      cout << itr << "\n";
    } else {
      cout << "-1\n";
    }
  }
  return 0;
}
