#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long maxx = 0, m = 1, arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (i > 0) {
        if (arr[i] == arr[i - 1]) {
          m++;
        }
      }
      maxx = max(arr[i], maxx);
    }
    if (m == n) {
      cout << -1 << '\n';
    } else {
      for (int i = 0; i < n; i++) {
        if (i == 0 and arr[i] == maxx and arr[i] > arr[i + 1]) {
          cout << i + 1 << '\n';
          break;
        } else if (i < n - 1 and i != 0 and arr[i] == maxx and
                   arr[i] > arr[i + 1]) {
          cout << i + 1 << '\n';
          break;
        } else if (i < n - 1 and i != 0 and arr[i] == maxx and
                   arr[i] > arr[i - 1]) {
          cout << i + 1 << '\n';
          break;
        } else if (i == n - 1 and arr[i] == maxx and arr[i] > arr[i - 1]) {
          cout << i + 1 << '\n';
          break;
        }
      }
    }
  }
}
