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;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int pos;
    int mx = 0;
    if (n == 1) {
      cout << 1 << endl;
      continue;
    }
    bool flag = false;
    for (int i = 1; i < n; i++) {
      if (arr[i] != arr[i - 1]) {
        flag = true;
        break;
      }
    }
    if (flag == false) {
      cout << -1 << endl;
      continue;
    }
    for (int i = 0; i < n; i++) {
      mx = max(arr[i], mx);
    }
    for (int i = 0; i < n; i++) {
      if (arr[i] == mx) {
        if (i + 1 < n)
          if (arr[i] > arr[i + 1]) pos = i + 1;
        if (i - 1 >= 0)
          if (arr[i] > arr[i - 1]) pos = i + 1;
      }
    }
    cout << pos << endl;
  }
  return 0;
}
