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 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;
}
