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 MOD = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
char txt[1000005];
char pat[1000005];
int lps[1000005];
class matrix {
 public:
  int row, col;
  vector<vector<long long> > num;
  matrix(int r, int c, int val) {
    this->num = vector<vector<long long> >(r, vector<long long>(c, val));
    this->row = r;
    this->col = c;
  }
  matrix(vector<vector<long long> > mtx) {
    this->num = mtx;
    this->row = mtx.size();
    this->col = mtx[0].size();
  }
  matrix operator*(matrix another) {
    matrix newone(this->row, another.col, INT_MIN);
    for (int r = 0; r < newone.row; r++) {
      for (int c = 0; c < newone.col; c++) {
        for (int k = 0; k < this->col; k++) {
          newone.num[r][c] += this->num[r][k] * another.num[k][c];
          newone.num[r][c] %= MOD;
        }
      }
    }
    return newone;
  }
  matrix operator^(long long x) {
    if (x == 1)
      return *this;
    else {
      matrix halfpower = (*this) ^ (x / 2);
      if (x % 2 == 0)
        return halfpower * halfpower;
      else
        return halfpower * halfpower * (*this);
    }
  }
};
int t;
vector<int> ans;
void printans() {
  for (int i = 0; i < t; i++) printf("%d\n", ans[i]);
}
int n, a[300005];
int main() {
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    scanf("%d", &n);
    for (int j = 0; j < n; j++) scanf("%d", &a[j]);
    int mxm = 0;
    for (int j = 0; j < n; j++) mxm = max(mxm, a[j]);
    int flag = -1;
    for (int j = 0; j < n; j++) {
      if (a[j] == mxm) {
        bool okl = false, okr = false;
        if (j - 1 >= 0 && a[j - 1] != mxm) okl = true;
        if (j + 1 < n && a[j + 1] != mxm) okr = true;
        if (okl || okr) {
          flag = j + 1;
          break;
        }
      }
    }
    ans.push_back(flag);
  }
  printans();
  return 0;
}
