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;
long long expo(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x;
    res %= 1000000007;
    y = y >> 1;
    x = x * x;
    x %= 1000000007;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    long long max = INT_MIN;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] > max) {
        max = a[i];
      }
    }
    vector<long long> v;
    for (int i = 0; i < n; i++) {
      if (a[i] == max) {
        v.push_back(i);
      }
    }
    long long flg = 0;
    for (auto ind : v) {
      if (ind >= 1) {
        if (a[ind] > a[ind - 1]) {
          cout << ind + 1 << endl;
          flg = 1;
          break;
        }
      }
      if (ind < (n - 1)) {
        if (a[ind] > a[ind + 1]) {
          cout << ind + 1 << endl;
          flg = 1;
          break;
        }
      }
    }
    if (flg == 0) {
      cout << -1 << endl;
    }
  }
}
