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>
const int MX = 10010896;
const int lmt = 3164;
const int N = 10000001;
using namespace std;
long long int extgcd(long long int a, long long int b, long long int& x,
                     long long int& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    int g = extgcd(b, a % b, y, x);
    y -= a / b * x;
    return g;
  }
}
long long int modpow(long long int a, long long int b) {
  long long int res = 1;
  a %= 1000000007;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
inline void solve() {
  int n;
  cin >> n;
  int arr[n], mx = -1, idx = -1;
  bool f = true;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if ((i > 0) && (arr[i - 1] != arr[i])) f = false;
    if (mx < arr[i]) {
      mx = arr[i];
      idx = i;
    }
  }
  if (f)
    cout << "-1\n";
  else {
    while (idx + 1 < n && arr[idx] == arr[idx + 1]) idx++;
    cout << idx + 1 << "\n";
  }
}
int main() {
  cout << fixed << setprecision(12);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1, tc = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
