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;
const int INF = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n], flag = 0;
    long long mx = 0;
    long long ans = 0;
    for (long long i = 0; i < (n); i++) {
      cin >> arr[i];
      if (i > 0 && flag == 0) {
        if (arr[i] != arr[i - 1]) flag = 1;
      }
      if (i > 0 && (arr[i] > arr[i - 1] || arr[i] > arr[i + 1]) &&
          arr[i] > mx) {
        mx = arr[i];
        ans = i;
      }
    }
    if (flag == 0 || n == 1) {
      cout << -1 << endl;
      continue;
    }
    cout << ans + 1 << endl;
  }
  return 0;
}
