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 main() {
  int t;
  cin >> t;
  for (int mi = 0; mi < t; mi++) {
    int n;
    cin >> n;
    int arr[n];
    int maxi1 = -1;
    int maxi2 = -1;
    int t1 = 0;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (arr[i] > maxi1) {
        maxi1 = arr[i];
        maxi2 = i;
      }
      if (i > 0) {
        if (arr[i] != arr[i - 1]) {
          t1++;
        }
      }
    }
    if (t1 == 0) {
      cout << -1 << endl;
    } else {
      for (int i = 0; i < n; i++) {
        if (arr[i] == maxi1) {
          if (i == 0) {
            if (arr[i] > arr[i + 1]) {
              cout << i + 1 << endl;
              break;
            }
          } else if (i == (n - 1)) {
            if (arr[i] > arr[i - 1]) {
              cout << i + 1 << endl;
              break;
            }
          } else {
            if (arr[i] > arr[i - 1] or arr[i] > arr[i + 1]) {
              cout << i + 1 << endl;
              break;
            }
          }
        }
      }
    }
  }
}
