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;
const long long N = 10000000000;
const long long inf = 0x3f3f3f3f3f3f3f3f;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = ((res) * (x));
    res %= N;
    y = y >> 1;
    x = ((x) * (x));
  }
  return res;
}
long long powmod(long long a, long long b, long long n) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y) % n;
    }
    y = (y * y) % n;
    b /= 2;
  }
  return x % n;
}
bool sortbyval(pair<long long, long long>& p1, pair<long long, long long>& p2) {
  return p1.second < p2.second;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tc = 1;
  cin >> tc;
  while (tc--) {
    long long n;
    cin >> n;
    long long a[n];
    long long mx = INT_MIN;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] > mx) {
        mx = a[i];
      }
    }
    long long index = -1;
    if (a[0] == mx && a[1] < mx) {
      index = 1;
    } else if (a[n - 1] == mx && a[n - 2] < mx) {
      index = n;
    } else {
      for (long long i = 1; i < n - 1; i++) {
        if (a[i] == mx) {
          if (a[i - 1] < mx || a[i + 1] < mx) {
            index = i + 1;
          }
        }
      }
    }
    cout << index << '\n';
  }
  return 0;
}
