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>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <typename T>
void __printer(const char* var_name, T&& val) {
  cerr << var_name << " = " << val << endl;
}
template <typename T, typename... Arguments>
void __printer(const char* arg_names, T&& val, Arguments&&... remaining_args) {
  const char* comma = strchr(arg_names + 1, ',');
  cerr.write(arg_names, comma - arg_names) << " = " << val << ", ";
  __printer(comma + 1, remaining_args...);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    std::vector<long long int> v(n);
    for (long long int i = 0; i <= n - 1; ++i) cin >> v[i];
    long long int a = *max_element((v).begin(), (v).end());
    long long int flag = 0;
    for (long long int i = 0; i <= n - 1; ++i) {
      if (v[i] != a) {
        flag = 1;
        break;
      }
    }
    if (flag) {
      long long int ans = 0;
      for (long long int i = 0; i <= n - 1; ++i) {
        if (v[i] == a) {
          ans = i + 1;
          break;
        }
      }
      cout << ans << '\n';
    } else
      cout << "-1\n";
  }
  return 0;
}
