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 ara[300005];
int main() {
  int T, n;
  cin >> T;
  while (T--) {
    cin >> n;
    int mx = 0;
    for (int i = 0; i < n; i++) {
      cin >> ara[i];
      if (ara[i] > mx) {
        mx = ara[i];
      }
    }
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (ara[i] == mx) cnt++;
    }
    if (cnt == n) {
      cout << -1 << "\n";
    } else {
      for (int i = 0; i < n; i++) {
        if (ara[i] == mx) {
          if (i == 0) {
            if (ara[i + 1] < mx) {
              cout << i + 1 << "\n";
              break;
            }
          }
          if (i == n - 1) {
            if (ara[i - 1] < mx) {
              cout << i + 1 << "\n";
              break;
            }
          }
          if (i != 0 && i != n - 1) {
            if (ara[i - 1] < mx || ara[i + 1] < mx) {
              cout << i + 1 << "\n";
              break;
            }
          }
        }
      }
    }
  }
  return 0;
}
