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;
    vector<int> v;
    int first = 0;
    int z = 1;
    int mx = 0;
    bool ch = true;
    for (int i = 0; i < n; ++i) {
      int a;
      cin >> a;
      if (z) {
        first = a;
        z = 0;
      }
      v.push_back(a);
      mx = max(mx, a);
      if (a != first) {
        ch = false;
      }
    }
    if (!ch) {
      for (int i = 0; i < n; ++i) {
        if (i == 0 and v[i] == mx and v[i + 1] < mx) {
          cout << i + 1 << endl;
          break;
        }
        if (i == n - 1 and v[i] == mx and v[i - 1] < mx) {
          cout << i + 1 << endl;
          break;
        }
        if (v[i] == mx and v[i - 1] < mx || v[i + 1] < mx) {
          cout << i + 1 << endl;
          break;
        }
      }
    } else {
      cout << -1 << endl;
    }
  }
}
