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;
long long int mex(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b % 2)
    return a * mex((a * a) % m, (b - 1) / 2, m) % m;
  else
    return mex((a * a) % m, b / 2, m);
}
int x, y;
void exteu(long long int a, long long int m) {
  if (m == 0) {
    x = 1;
    y = 0;
  } else {
    exteu(m, a % m);
    long long int temp = x;
    x = y;
    y = temp - (a / m) * y;
  }
}
long long int fact(long long int n) {
  long long int prod = 1;
  for (long long int i = 2; i <= n; i++) {
    prod *= i;
  }
  return prod;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<vector<long long int>> D = {{-1, -1}, {1, 1}, {1, -1}, {-1, 1}};
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int mx = 0, ind = -1;
  for (long long int i = 0; i < n; i++) {
    if ((i > 0 && a[i] > a[i - 1]) || (i < n - 1 && a[i] > a[i + 1])) {
      if (a[i] > mx) {
        ind = i;
        mx = a[i];
      }
    }
  }
  cout << ind + 1 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int TESTS = 1;
  cin >> TESTS;
  for (long long int i = 0; i < TESTS; i++) {
    solve();
  }
  return 0;
}
