#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    int mex = -1;
    int mi = INT_MAX;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      mex = max(arr[i], mex);
      mi = min(arr[i], mi);
    }
    if (mi == mex) {
      cout << -1 << endl;
    } else {
      for (int i = 0; i < n; i++) {
        if (i && arr[i] == mex && arr[i] > arr[i - 1]) {
          cout << i + 1 << endl;
          break;
        } else if (i != n - 1 && arr[i] == mex && arr[i] > arr[i + 1]) {
          cout << i + 1 << endl;
          break;
        }
      }
    }
  }
}
