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(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    long long int i, j, n, m, x, y, e = 0, x1, y1, z1, x2, y2, p, sum = 0,
                                    te = 0, r, z, k, l;
    cin >> n;
    long long int a[n + 5], b[n + 5];
    set<long long int> s;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = a[i];
      s.insert(a[i]);
    }
    if ((long long int)s.size() == 1) {
      cout << "-1\n";
      continue;
    }
    sort(b, b + n);
    x = b[n - 1];
    if (a[0] == x && a[1] < x) {
      cout << "1\n";
      continue;
    }
    if (a[n - 1] == x && a[n - 2] < x) {
      cout << n << "\n";
      continue;
    }
    for (i = 1; i < n - 1; i++) {
      if (a[i] == x && (a[i - 1] < x || a[i + 1] < x)) {
        cout << i + 1 << "\n";
        break;
      }
    }
  }
  return 0;
}
