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 main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, mx = INT_MIN, c = 0;
    cin >> n;
    long long A[n];
    for (long long i = 0; i < n; i++) {
      cin >> A[i];
      if (A[i] > mx) mx = A[i];
    }
    for (long long i = 0; i < n; i++) {
      if (A[i] == mx) {
        c++;
      }
    }
    if (c == n) {
      cout << -1 << endl;
      goto l;
    }
    for (long long i = 0; i < n; i++) {
      if (A[i] == mx && i == 0 && A[i + 1] != mx) {
        cout << i + 1 << endl;
        goto l;
      } else if (A[i] == mx && i == n - 1 && A[i - 1] != mx) {
        cout << i + 1 << endl;
        goto l;
      } else if (A[i] == mx && (A[i + 1] != mx || A[i - 1] != mx) &&
                 i != n - 1 && i != 0) {
        cout << i + 1 << endl;
        goto l;
      }
    }
  l:;
  }
}
