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;
const int inf = (int)1e9;
const long long mod = (long long)1e9 + 7;
const double eps = (double)1e-9;
const double pi = acos(-1.0);
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 300500;
int n, a[N];
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    int mx = -inf;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      mx = max(mx, a[i]);
    }
    int ans = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] != mx) continue;
      if ((i > 1 && a[i - 1] < a[i]) || (i < n && a[i] > a[i + 1])) ans = i;
    }
    cout << ans << "\n";
  }
  return 0;
}
