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;
long long a[1000005], n;
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  int test;
  cin >> test;
  while (test--) {
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> a[i];
    int max1 = *max_element(a + 1, a + n + 1);
    int dem = 0;
    for (int i = 1; i <= n; ++i) {
      if (a[i] == max1) {
        if (i > 1 && a[i] > a[i - 1]) {
          cout << i << "\n";
          dem++;
          break;
        }
        if (i < n && a[i] > a[i + 1]) {
          cout << i << "\n";
          dem++;
          break;
        }
      }
      if (dem == 0) cout << -1 << "\n";
    }
  }
  return 0;
}
