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;
int solve() {
  int i, n, max, flag = 0;
  cin >> n;
  int arr[n];
  max = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] > max) max = arr[i];
  }
  for (i = 0; i < n && arr[i] == max; i++) {
    if (i == 0) {
      if (arr[i + 1] < max) {
        cout << i + 1 << endl;
        return 1;
      }
    } else if (i == n - 1) {
      if (arr[i - 1] < max) {
        cout << i + 1 << endl;
        return 1;
      }
    } else if (i > 0 && i < n) {
      if (arr[i - 1] < max || arr[i + 1] < max) {
        cout << i << endl;
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  int t, n, a;
  cin >> t;
  while (t--) {
    a = solve();
    if (a == 0) cout << "-1" << endl;
  }
  return 0;
}
