#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, sum;
  cin >> t;
  while (t--) {
    sum = 0;
    cin >> n;
    int p = 0;
    int x, mx, h = 0, maxx;
    cin >> mx;
    maxx = mx;
    for (int i = 1; i < n; i++) {
      cin >> x;
      if (mx != x) {
        p++;
      }
      if (p && mx < x) {
        mx = x;
        h = i;
      }
      if (!p && mx == x) {
        mx = x;
        h = i;
      }
    }
    if (!p)
      cout << -1 << endl;
    else
      cout << h + 1 << endl;
  }
  return 0;
}
