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 int d4i[] = {-1, 0, 1, 0};
const int d4j[] = {0, 1, 0, -1};
const int d8i[] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int d8j[] = {-1, 0, 1, 1, 1, 0, -1, -1};
void solve() {
  int n;
  cin >> n;
  int ind = -1;
  int arr[n];
  int m = INT_MIN;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (arr[i] > m) {
      m = arr[i];
    }
  }
  bool flag = false;
  for (int i = 0; i < n; ++i) {
    if (arr[i] == m) {
      if (i) {
        if (arr[i - 1] < m) {
          ind = i;
          flag = true;
          break;
        }
      }
      if (i < n - 1) {
        if (arr[i + 1] < m) {
          ind = i;
          flag = true;
          break;
        }
      }
    }
  }
  if (flag)
    cout << ind + 1 << endl;
  else
    cout << -1 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
