#include <bits/stdc++.h>
using namespace std;
int a[300005];
int answer[300004];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, ansmax = 0, ans = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] > ansmax) {
        ans = 0;
        answer[ans] = i;
        ans++;
        ansmax = a[i];
      } else if (a[i] == ansmax) {
        answer[ans] = i;
        ans++;
      } else {
        continue;
      }
    }
    if (ans == n) {
      cout << "-1" << endl;
    } else {
      for (int i = 0; i < ans; i++) {
        if (answer[i] == 0) {
          if (a[0] > a[1]) {
            cout << "1" << endl;
            break;
          }
        } else if (answer[i] == (n - 1)) {
          if (a[n - 1] > a[n - 2]) {
            cout << n << endl;
            break;
          }
        } else {
          if (a[answer[i]] > a[answer[i] + 1] ||
              a[answer[i]] > a[answer[i] - 1]) {
            cout << answer[i] + 1 << endl;
            break;
          }
        }
      }
    }
  }
  return 0;
}
