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 pwr(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a *= a;
    b >>= 1;
  }
  return res;
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    vector<long long> v;
    long long maxi = 0, in = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      v.push_back(a[i]);
      if (a[i] >= maxi) {
        maxi = a[i];
      }
    }
    long long flag = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] == maxi) {
        long long check = 0;
        if (i > 0) {
          if (a[i - 1] < a[i]) check++;
        }
        if (i < n) {
          if (a[i + 1] < a[i]) check++;
        }
        if (check > 0) {
          flag = 1;
          cout << i + 1 << endl;
          break;
        }
      }
    }
    if (flag == 0) {
      cout << "-1\n";
    }
  }
}
