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;
    int arr[n + 2];
    int mx = 0, st[n + 2], f = 0, k = 0, ans, i;
    for (int i1 = 0; i1 < n; i1++) {
      cin >> arr[i1];
      if (mx <= arr[i1]) {
        mx = arr[i1];
        st[k] = i1;
        k++;
      }
    }
    for (int i2 = 0; i2 < n; i2++) {
      if (arr[i2] == mx) {
        f = 0;
      } else {
        f = 1;
        break;
      }
    }
    if (f == 1) {
      for (i = 0; i < k; i++) {
        if (((i + 1) < n && (i + 1) >= 0) && (arr[i + 1] < arr[i])) {
          ans = i;
          break;
        } else if (((i - 1) < n && (i - 1) >= 0) && (arr[i - 1] < arr[i])) {
          ans = i;
          break;
        }
      }
      cout << ans + 1 << endl;
    } else
      cout << "-1" << endl;
  }
  return 0;
}
