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 comment(linker, "/stack:16777216")
namespace Template {
using namespace std;
template <typename T>
T MAX(const T &a) {
  return a;
}
template <typename T, typename... Rest>
T MAX(const T &a, const Rest &...r) {
  return std::max(a, MAX(r...));
}
template <typename T>
T MIN(const T &a) {
  return a;
}
template <typename T, typename... Rest>
T MIN(const T &a, const Rest &...r) {
  return std::min(a, MIN(r...));
}
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << ", ";
    return *this;
  }
} dbg;
template <typename T>
void sci(T &t) {
  cin >> t;
}
template <typename T, typename... Ts>
void sci(T &t, Ts &...ts) {
  cin >> t;
  sci(ts...);
}
template <typename T>
inline T gcd(T a, T b) {
  T c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
template <typename T, typename S>
ostream &operator<<(ostream &os, const pair<T, S> &v) {
  os << "(";
  os << v.first << "," << v.second << ")";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  size_t sz = v.size();
  for (size_t i = 0; i < sz; ++i) {
    os << v[i];
    if (i + 1 != sz) os << " ";
  }
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const deque<T> &v) {
  size_t sz = v.size();
  for (size_t i = 0; i < sz; ++i) {
    os << v[i];
    if (i + 1 != sz) os << " ";
  }
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  T last = *v.rbegin();
  os << "[";
  for (auto it : v) {
    os << it;
    if (it != last) os << ",";
  }
  os << "] ";
  return os;
}
template <typename T, typename S>
ostream &operator<<(ostream &os, const map<T, S> &v) {
  for (auto it : v) {
    os << it.first << " : " << it.second << " , ";
  }
  return os;
}
template <typename A, typename B>
istream &operator>>(istream &cin, pair<A, B> &p) {
  cin >> p.first;
  return cin >> p.second;
}
long long powmod(long long a, long long b, long long mo) {
  long long res = 1;
  a %= mo;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mo;
    a = a * a % mo;
  }
  return res;
}
struct _runCode {
  clock_t time;
  int m;
  _runCode(int mode) {
    m = mode;
    if (mode == -1)
      freopen("C:\\Users\\prave\\workspace\\Codeforces\\input.txt", "w",
              stdout);
    if (mode == 1 || mode == 2)
      freopen("C:\\Users\\prave\\workspace\\Codeforces\\input.txt", "r", stdin);
    if (mode == 2)
      freopen("C:\\Users\\prave\\workspace\\Codeforces\\output.txt", "w",
              stdout);
    time = clock();
  }
  ~_runCode() {
    cerr << "\nTime: " << ((float)(clock() - time) / CLOCKS_PER_SEC) << '\n';
  }
};
};  // namespace Template
using namespace Template;
void solve(int t) {
  int n;
  sci(n);
  ;
  vector<int> a(n);
  for (int i = 0; i < (int)n; ++i) cin >> a[i];
  ;
  bool isAll = true;
  int maxx = 0;
  ;
  for (int i = (int)(0); i <= (int)(n - 1); ++(i)) {
    if (i != 0 && a[i] != a[i - 1]) {
      isAll = false;
    }
    if (i != 0 && a[i] != a[i - 1] && a[i] >= a[maxx]) {
      maxx = i;
    }
    if (i != n - 1 && a[i] != a[i + 1] && a[i] >= a[maxx]) {
      maxx = i;
    }
  }
  cout << ((isAll) ? -1 : (maxx + 1)) << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  ;
  int t;
  sci(t);
  ;
  for (int i = 0; i < (int)t; ++i) solve(i);
  return 0;
}
