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--) {
    long long int n;
    cin >> n;
    long long int a[n];
    long long int b[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = a[i];
    }
    sort(b, b + n);
    long long int mx = b[n - 1];
    bool flag = false;
    long long int ans;
    for (int i = 0; i < n; i++) {
      if (a[i] == mx) {
        if (i == 0) {
          if (a[i] > a[i + 1]) {
            ans = i + 1;
            flag = true;
            break;
          }
        } else if (i == n - 1) {
          if (a[i] > a[i - 1]) {
            ans = i + 1;
            flag = true;
            break;
          }
        } else {
          if (a[i] > a[i + 1] or a[i] > a[i - 1]) {
            ans = i + 1;
            flag = true;
            break;
          }
        }
      }
    }
    if (flag)
      cout << ans << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
