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;
void solve() {
  vector<long long int> pirahna;
  long long int n;
  cin >> n;
  long long int index = 0;
  for (long long int i = 0; i < n; i++) {
    long long int a;
    cin >> a;
    pirahna.push_back(a);
  }
  long long int max = *max_element(pirahna.begin(), pirahna.end());
  if (pirahna[n - 1] == max && pirahna[n - 2] < max) {
    index = n;
  }
  if (pirahna[0] == max && pirahna[1] < max) {
    index = 1;
  } else {
    for (long long int i = 0; i < n; i++) {
      if (pirahna[i] == max && pirahna[i + 1] < max) {
        index = i + 1;
        break;
      }
      if (pirahna[i] == max && pirahna[i - 1] < max) {
        index = i + 1;
        break;
      }
    }
  }
  if (index == 0) {
    cout << -1 << "\n";
  } else {
    cout << index << "\n";
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
