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;
const int MAXN = 300010;
const int MAXM = 100010;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int read() {
  int s = 0, f = 1;
  char ch = getchar();
  while ('0' > ch || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    s = (s << 3) + (s << 1) + (ch - '0');
    ch = getchar();
  }
  return s * f;
}
int n, m, k;
int ans, cnt, tot;
int a[MAXN], b[MAXN];
string s;
int main() {
  int T;
  T = read();
  while (T--) {
    n = read();
    memset(a, 0, sizeof(a));
    int p = 0;
    for (int i = 1; i <= n; i++) {
      a[i] = read();
      if (a[i] > a[p]) p = i;
    }
    while (a[p + 1] == a[p]) ++p;
    int f = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] != a[p]) f = 1;
    }
    if (f) {
      if (p - 1 >= 1 && a[p - 1] < a[p])
        printf("%d\n", p);
      else if (p + 1 <= n && a[p + 1] < a[p])
        printf("%d\n", p);
    } else
      puts("-1");
  }
  return 0;
}
