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() {
  long long int m, p, k = 0, l, q, r, j, x, y, t, n, i;
  cin >> t;
  while (t--) {
    cin >> m;
    vector<long long int> a(m);
    k = 0;
    p = 0;
    for (i = 0; i < m; i++) {
      cin >> a[i];
      p = max(p, a[i]);
    }
    for (i = 0; i < m; i++) {
      if (a[i] == p) {
        if (i > 0) {
          if (a[i] > a[i - 1]) {
            k = i + 1;
            break;
          }
        }
        if (i < m) {
          if (a[i] > a[i + 1]) {
            k = i + 1;
            break;
          }
        }
      }
    }
    if (k == 0) {
      cout << -1 << endl;
      continue;
    }
    cout << k << endl;
  }
}
