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;
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long N = 200005, INF = 2000000000000000000;
void solve() {
  long long n;
  long long i = 0;
  set<long long> s;
  cin >> n;
  long long* v = new long long[n];
  for (i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v[i] = x;
    s.insert(x);
  }
  long long c = 0;
  c = distance(v, max_element(v, v + n));
  if (s.size() > 1) {
    cout << c + 1 << "\n";
  } else {
    cout << "-1"
         << "\n";
  }
  s.clear();
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
