#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i <= n - 1; i++) cin >> a[i];
    int mx = INT_MIN;
    for (int i = 0; i <= n - 1; i++) mx = max(mx, a[i]);
    int ans = -1;
    int fl = 0;
    for (int i = 0; i <= n - 1; i++) {
      if (a[i] == mx) {
        if (i - 1 >= 0 && a[i - 1] < mx) {
          ans = i + 1;
          fl = 1;
          break;
        }
        if (i + 1 <= n - 1 && a[i + 1] < mx) {
          ans = i + 1;
          fl = 1;
          break;
        }
      }
    }
    cout << ans << endl;
  }
}
