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 t, n, a[400000];
string s;
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    int maxn = 0;
    a[0] = a[n + 1] = 1e9 + 2;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      maxn = max(maxn, a[i]);
    }
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] == maxn && (a[i] > a[i - 1] || a[i] > a[i + 1])) {
        cout << i << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 0) cout << -1 << endl;
  }
  return 0;
}
