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 i = 0; i < t; i++) {
    int n;
    cin >> n;
    int ar[n], max, pos, check = 0;
    for (int j = 0; j < n; j++) {
      cin >> ar[j];
      if (j == 0) {
        max = ar[j];
        pos = j;
      }
      if (ar[j] > max) {
        max = ar[j];
        pos = j;
        check = 1;
      }
      if (check == 0 && ar[j - 1] == max && ar[j] != max) {
        check = 1;
        pos = j - 1;
      }
    }
    if (check == 0)
      cout << -1 << endl;
    else
      cout << pos + 1 << endl;
  }
}
