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, x, mx, r, n, pos, idx;
  cin >> t;
  while (t--) {
    cin >> n;
    int a[n], b[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = a[i];
    }
    sort(b, b + n);
    mx = b[n - 1];
    for (int i = 0; i < n; i++) {
      if (a[i] == mx) {
        idx = i;
        break;
      }
    }
    int cnt = 0;
    r = a[0];
    for (int i = 1; i < n; i++) {
      if (r == a[i]) {
        r = a[i];
        cnt++;
      }
    }
    if (cnt == n - 1) {
      cout << -1 << endl;
      continue;
    }
    a[-1] = INT_MAX;
    bool chk = false;
    for (int i = 0; i < n - 1; i++) {
      if (a[i] != mx)
        continue;
      else {
        if ((a[i] > a[i - 1]) || (a[i] > a[i + 1])) {
          chk = true;
          pos = i;
          break;
        }
      }
    }
    if (chk == false) {
      cout << (idx + 1) << endl;
      continue;
    }
    cout << pos + 1 << endl;
  }
  return 0;
}
