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() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long int ans = 0;
    vector<long long int> a;
    for (int i = 0; i < n; i++) {
      long long int x;
      cin >> x;
      a.push_back(x);
    }
    long long int k = *max_element(a.begin(), a.end());
    for (int i = 0; i < n; i++) {
      if (i == 0) {
        if (a[i] == k && a[i + 1] != k) {
          ans = i + 1;
          break;
        }
      } else if (i == (n - 1)) {
        if (a[i] == k && a[i - 1] != k) {
          ans = i + 1;
          break;
        }
      } else {
        if (a[i] == k) {
          if (a[i + 1] != k || a[i - 1] != k) {
            ans = i + 1;
            break;
          }
        }
      }
    }
    if (ans == 0) {
      cout << "-1" << endl;
    } else {
      cout << ans << endl;
    }
  }
  return 0;
}
