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() {
  long long int t;
  cin >> t;
  for (long long int j = 0; j < t; j++) {
    long long int n, x, y = 0;
    int z = 0;
    cin >> n;
    long long int *p;
    p = new long long int[n];
    for (long long int i = 0; i < n; i++) {
      cin >> p[i];
    }
    x = p[0];
    for (long long int i = 1; i < n; i++) {
      if (x < p[i]) {
        x = p[i];
        y = i;
      }
    }
    for (long long int i = n - 1; i >= y - 1; i--) {
      if (p[i] == x) {
        if (p[i - 1] < x || p[i + 1] < x) {
          y = i;
          break;
        }
      }
    }
    for (long long int i = 0; i < n; i++) {
      if (p[i] < x) {
        z = 1;
      }
    }
    y = y + 1;
    if (z == 1) {
      cout << y << endl;
    } else {
      cout << "-1" << endl;
    }
  }
}
