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;
bool isPrime(long long int n) {
  if (n <= 1) return 0;
  if (n <= 3) return 1;
  if (n % 2 == 0 || n % 3 == 0) return 0;
  for (long long int i = 5; i * i <= n; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return 0;
  return 1;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / (gcd(a, b));
}
void swap(int& a, int& b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
inline void solve() {
  long long int n = 0;
  cin >> n;
  long long int a[n];
  long long int mx = -1, pos = 0, mn = 1e18;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > mx) {
      mx = a[i];
      pos = i;
    }
    if (a[i] < mn) mn = a[i];
  }
  if (mn == mx) {
    cout << -1 << '\n';
    return;
  }
  for (long long int i = 0; i < n - 1; i++) {
    if (i == pos) {
      if (a[pos] == a[pos + 1])
        pos++;
      else
        break;
    }
  }
  cout << pos + 1 << '\n';
}
signed main() {
  auto start_time = clock();
  cerr << setprecision(3) << fixed;
  cout << setprecision(15) << fixed;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int tt;
  cin >> tt;
  while (tt--) {
    solve();
  }
  auto end_time = clock();
  cerr << "Execution time: "
       << (end_time - start_time) * (int)1e3 / CLOCKS_PER_SEC << " ms\n";
  return 0;
}
