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, n, x, k, i;
  cin >> t;
  while (t--) {
    cin >> n;
    long long a[100001] = {0};
    long long max = -1;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      x = a[1];
      if (a[i] == x) {
        x = a[i];
      } else {
        x = 0;
      }
      if (a[i] > max) {
        max = a[i];
        k = i;
      }
    }
    if (x != 0) {
      cout << "-1" << endl;
    } else {
      for (i = 1; i <= n; i++) {
        if (a[i] == a[k] &&
            ((a[i] > a[i + 1] && i < n) || (a[i] > a[i - 1] && i > 1))) {
          cout << i << endl;
          break;
        }
      }
    }
  }
  return 0;
}
