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;
  while (t--) {
    int n, m = 0, sum = INT_MIN;
    cin >> n;
    bool flag = true;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      sum = max(sum, arr[i]);
    }
    int x = arr[0];
    for (int i = 1; i < n; i++) {
      if ((arr[i] > arr[i - 1] || arr[i] > arr[i + 1]) && arr[i] == sum) {
        m = i;
      }
      if (x - arr[i] != 0) {
        flag = false;
      }
    }
    if (flag == false)
      cout << m + 1 << endl;
    else
      cout << "-1" << endl;
  }
  return 0;
}
