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 n, a[300100], Max;
int Read() {
  int val = 0, opt = 1;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') opt = -1;
  while (isdigit(ch)) (val *= 10) += ch - '0', ch = getchar();
  return val * opt;
}
void solve() {
  n = Read();
  Max = 0;
  for (int i = 1; i <= n; i++) {
    a[i] = Read();
    Max = max(Max, a[i]);
  }
  a[0] = INT_MAX;
  a[n + 1] = INT_MAX;
  for (int i = 1; i <= n; i++) {
    if (a[i] == Max && (a[i] > a[i - 1] || a[i] > a[i + 1])) {
      printf("%d\n", i);
      return;
    }
  }
  printf("-1\n");
}
int main() {
  for (int t = Read(); t; t--) {
    solve();
  }
  return 0;
}
