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() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t != 0) {
    t--;
    int n;
    cin >> n;
    set<int> el;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      el.insert(arr[i]);
    }
    if (el.size() == 1) {
      cout << -1 << "\n";
    } else {
      int large = 0, large_i = 0;
      for (int i = 0; i < n; i++) {
        if (arr[i] > large) {
          large = arr[i];
        }
      }
      for (int i = 0; i < n; i++) {
        if (arr[i] == large) {
          if (i > 0 && arr[i] > arr[i - 1]) {
            large_i = i + 1;
          }
          if (i < n && arr[i] > arr[i + 1]) {
            large_i = i + 1;
          }
        }
      }
      cout << large_i << "\n";
    }
  }
  return 0;
}
