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 N = 3e5 + 10;
const double eps = 1e-9;
const int inf = 1e9;
int a[N];
set<int> S;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    S.clear();
    scanf("%d", &n);
    int mx = -1;
    for (int i = 0; i < n; i++) {
      scanf("%d", a + i);
      mx = max(a[i], mx);
      S.insert(a[i]);
    }
    if ((int)S.size() == 1) {
      printf("-1\n");
      continue;
    }
    int ans = -1;
    for (int i = 0; i < n; i++) {
      if (a[i] == mx) {
        if (i && a[i] > a[i - 1]) {
          ans = i + 1;
          break;
        }
        if (i + 1 < n && a[i] > a[i + 1]) {
          ans = i + 1;
          break;
        }
      }
    }
    printf("%d\n", ans);
  }
}
