#include <bits/stdc++.h>
using namespace std;
template <typename T, typename S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  os << '(' << v.first << ' ' << v.second << ')';
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const unordered_map<T, S>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T>
void print(T var1) {
  cout << var1 << '\n';
}
template <typename T, typename... Types>
void print(T var1, Types... var2) {
  cout << var1 << ' ';
  print(var2...);
}
template <typename T>
T Max(T x) {
  return x;
}
template <typename T, typename... Types>
T Max(T var1, Types... var2) {
  return var1 >= Max(var2...) ? var1 : Max(var2...);
}
template <typename T>
T Min(T x) {
  return x;
}
template <typename T, typename... Types>
T Min(T var1, Types... var2) {
  return var1 <= Min(var2...) ? var1 : Min(var2...);
}
long long INF = 1000000000000000005LL;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs\n";
  return 0;
}
void solve() {
  long long n, ans = -1;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long val = *max_element(a.begin(), a.end());
  for (long long i = 0; i < n; i++) {
    if (a[i] == val) {
      if (i - 1 >= 0) {
        if (a[i - 1] < a[i]) {
          ans = i + 1;
          break;
        }
      }
      if (i + 1 < n) {
        if (a[i + 1] < a[i]) {
          ans = i + 1;
          break;
        }
      }
    }
  }
  print(ans);
}
