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;
using ll = long long int;
using lld = long double;
class Bignum {
 public:
  Bignum(int value) {
    assert(value >= 0 && value <= 999999999);
    parts.push_back(value);
  }
  Bignum& operator*=(int rhs) {
    assert(rhs >= 0 && rhs <= 999999999);
    uint32_t carry = 0;
    for (size_t i = 0; i < parts.size(); i++) {
      uint64_t product = (uint64_t)parts[i] * (uint64_t)rhs + carry;
      parts[i] = (uint32_t)(product % 1000000000LL);
      carry = (uint32_t)(product / 1000000000LL);
    }
    if (carry != 0) parts.push_back(carry);
    return *this;
  }
  friend std::ostream& operator<<(std::ostream& stream, const Bignum& num);

 private:
  std::vector<uint32_t> parts;
};
inline std::ostream& operator<<(std::ostream& stream, const Bignum& num) {
  char oldfill = stream.fill('0');
  for (std::vector<uint32_t>::const_reverse_iterator it = num.parts.rbegin();
       it != num.parts.rend(); it++)
    stream << *it << std::setw(9);
  stream.fill(oldfill);
  stream.width(0);
  return stream;
}
Bignum factorial(int n) {
  Bignum fac = 1;
  for (int i = 2; i <= n; i++) fac *= i;
  return fac;
}
ll bin_pow(ll a, ll b) {
  if (b == 0) return 1;
  long long res = bin_pow(a, b / 2);
  if (b % 2)
    return res * res * a;
  else
    return res * res;
}
template <typename t>
inline void print(const t& v) {
  for (const auto& i : v) {
    std::cout << i << " ";
  }
  std::cout << '\n';
}
string dec_to_bin(int n) {
  string binary = std::bitset<8>(n).to_string();
  return binary;
}
unsigned long bin_to_dec(string s) {
  unsigned long decimal = std::bitset<8>(s).to_ulong();
  return decimal;
}
unsigned int next_power_of2(unsigned int v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}
int digit(ll i) { return i > 0 ? (int)log10((double)i) + 1 : 1; }
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isNum(char ch) { return ch >= '0' && ch <= '9'; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int test;
  cin >> test;
  while (test--) {
    int n;
    cin >> n;
    vector<int> arr(n);
    set<int> st;
    for (auto& i : arr) cin >> i;
    for (auto i : arr) st.insert(i);
    if (st.size() == 1)
      cout << -1 << "\n";
    else {
      cout << max_element((arr).begin(), (arr).end()) - arr.begin() + 1 << "\n";
    }
  }
}
