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 count(long long num) {
  long long d = 0;
  while (num != 0) {
    d++;
    num = num / 10;
  }
  return d;
}
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> a(n), freq;
    long long f = 0;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long s = a[0];
    for (long long i = 1; i < n; i++) {
      if (a[i] != s) f = 1;
    }
    if (f == 0) {
      cout << -1 << endl;
    } else {
      long long c = 0, val = s;
      for (long long i = 1; i < n; i++) {
        if (a[i] != a[i - 1]) {
          if (val <= a[i]) {
            val = a[i];
            c = i;
          }
          if (val <= a[i - 1]) {
            val = a[i - 1];
            c = i - 1;
          }
        }
      }
      cout << c + 1 << endl;
    }
  }
}
