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;
void read(int &x) {
  x = 0;
  bool f = 0;
  char y = getchar();
  while (y < '0' || y > '9') {
    if (y == '-') f = 1;
    y = getchar();
  }
  while (y >= '0' && y <= '9') {
    x = x * 10 + y - '0';
    y = getchar();
  }
  if (f) x = -x;
}
int a[310101];
int main() {
  int i, t, n, j;
  read(t);
  while (t--) {
    read(n);
    int ma = 0, sum = 0;
    j = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", a + i);
      if (a[i] > ma) {
        ma = a[i];
        j = i;
      }
      if (a[i] == a[i - 1]) sum++;
    }
    if (sum == n - 1)
      printf("-1\n");
    else
      printf("%d\n", j);
  }
  return 0;
}
