#include <bits/stdc++.h>
using namespace std;
int t, n, a[300010], b[300010];
int pd(int x) {
  int p = x - 1, q = x + 1, sum = 1, k = a[x];
  while (sum < n) {
    if (p >= 1 && a[p] < k)
      k++, p--, sum++;
    else if (q <= n && a[q] < k)
      k++, q++, sum++;
    else
      return 0;
  }
  return 1;
}
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    int maxn = -1;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      maxn = max(maxn, a[i]);
    }
    int flag = 1;
    for (int i = 1; i <= n; i++)
      if (a[i] == maxn) {
        if (pd(i)) {
          printf("%d\n", i);
          flag = 0;
          break;
        }
      }
    if (flag) printf("-1\n");
  }
  return 0;
}
