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;
const double eps = 1e-9;
const int INF = 1e9;
const long long INFL = 1e18;
const double PI = 3.14;
const int mod = 1e9 + 7;
vector<pair<int, int> >::iterator iter;
int _X[] = {0, 1, 1, 1, 0, -1, -1, -1};
int _Y[] = {-1, -1, 0, 1, 1, 1, 0, -1};
int _X2[] = {1, 0, -1, 0};
int _Y2[] = {0, 1, 0, -1};
void FILE_OI() {
  fstream plik;
  plik.open("plik.txt");
  plik << "_put here your input_";
  plik.close();
}
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
int main(int argc, char *argv[]) {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> tab(n);
    int maxi = -INF;
    int id = -1;
    set<int> SET;
    for (int i = 0; i < n; i++) {
      cin >> tab[i];
      SET.insert(tab[i]);
    }
    if ((int)SET.size() == 1) {
      cout << -1 << '\n';
    } else {
      for (int i = 0; i < n; i++) {
        if (i == 0) {
          if (tab[i] > maxi && tab[i + 1] < tab[i]) {
            maxi = tab[i];
            id = i + 1;
          }
        } else if (i > 0 && i < n - 1) {
          if (tab[i] > maxi && (tab[i - 1] < tab[i] || tab[i + 1] < tab[i])) {
            maxi = tab[i];
            id = i + 1;
          }
        } else if (i == n - 1) {
          if (tab[i] > maxi && tab[i - 1] < tab[i]) {
            maxi = tab[i];
            id = i + 1;
          }
        }
      }
      cout << id << '\n';
    }
  }
  return 0;
}
