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 a, b, c, d, i, j, k, l, m, n, p, q, r, s, t, v, w, x, y, z, res, maximum,
      index;
  cin >> t;
  for (i = 1; i <= t; i++) {
    cin >> n;
    int arr[n + 5];
    maximum = -100;
    for (k = 1; k <= n; k++) {
      cin >> arr[k];
      maximum = max(arr[k], maximum);
    }
    arr[n + 1] = arr[n];
    arr[0] = arr[1];
    index = -1;
    for (j = 1; j <= n; j++) {
      if (arr[j] == maximum && (arr[j] > arr[j - 1] || arr[j] > arr[j + 1])) {
        index = j;
        break;
      }
    }
    cout << index << endl;
  }
  return 0;
}
