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 long long maxn = 1e6 + 2, inf = 1e9 + 7;
int a[maxn];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x, mx = 0, mid = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] >= mx) {
        if (i != 1 && a[i] > a[i - 1]) {
          mx = a[i];
          mid = i;
        }
        if (i != n && a[i] > a[i + 1]) {
          mx = a[i];
          mid = i;
        }
      }
    }
    if (mx) {
      printf("%d\n", mid);
    } else
      printf("-1\n");
  }
}
