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() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<long long> v(n);
    long long maxi = -1;
    for (int i = 0; i < n; i++) {
      cin >> v[i];
      maxi = max(maxi, v[i]);
    }
    if (v[0] == maxi && v[1] < maxi) {
      cout << "1\n";
      continue;
    } else if (v[n - 1] == maxi && v[n - 2] < maxi) {
      cout << n << "\n";
      continue;
    } else {
      int ans = -2;
      for (int i = 0; i < n - 1; i++) {
        if (v[i] == maxi && v[i + 1] < maxi) {
          ans = i;
          break;
        }
      }
      for (int i = n - 1; i > 0; i--) {
        if (v[i] == maxi && v[i - 1] < maxi) {
          ans = i;
          break;
        }
      }
      cout << ans + 1 << "\n";
    }
  }
  return 0;
}
