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 N = 1e5 + 5;
const int mod = 1e9 + 7;
inline int add(int a, int b) {
  int ret = ((long long int)a + b) % mod;
  if (ret < 0) ret += mod;
  return ret;
}
inline int mul(int a, int b) {
  int ret = ((long long int)a * b) % mod;
  if (ret < 0) ret += mod;
  return ret;
}
template <typename... Args>
inline int add(int a, Args... args) {
  return add(a, add(args...));
}
template <typename... Args>
inline int mul(int a, Args... args) {
  return mul(a, mul(args...));
}
inline int addm(int a, int b, int MOD) {
  int ret = ((long long int)a + b) % MOD;
  if (ret < 0) ret += MOD;
  return ret;
}
inline int mulm(int a, int b, int MOD) {
  int ret = ((long long int)a * b) % MOD;
  if (ret < 0) ret += MOD;
  return ret;
}
inline int addm(int a, int b, int c, int MOD) {
  return addm(a, addm(b, c, MOD), MOD);
}
inline int mulm(int a, int b, int c, int MOD) {
  return mulm(a, mulm(b, c, MOD), MOD);
}
template <typename T>
void show2d(const vector<vector<T>>& adj) {
  for (auto x : adj) {
    for (auto y : x) {
      cout << y << " ";
    }
    cout << "\n";
  }
}
long long int modexp(long long int a, long long int b, long long int mod) {
  long long int x = 1;
  while (b) {
    if (b & 1) x = ((x % mod) * (a % mod)) % mod;
    a = ((a % mod) * (a % mod)) % mod;
    b = b / 2;
  }
  return x;
}
bool ispalindrome(long long int n) {
  long long int rev = 0, n1 = n;
  while (n1 > 0) {
    rev = rev * 10 + n1 % 10;
    n1 /= 10;
  }
  return (n == rev);
}
void rf() {}
void solve() {
  int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long int b[n];
  for (int i = 0; i < n; ++i) b[i] = a[i];
  sort(a, a + n);
  long long int mx = *max_element(a, a + n);
  cerr << "mx"
       << ": " << mx << endl;
  if (a[0] == a[n - 1] && a[0] == mx) {
    cout << -1 << "\n";
  } else {
    for (int i = 0; i < n; ++i) {
      if (b[i] == mx) {
        if (i == 0) {
          if (b[i + 1] != mx) {
            cout << 1 << "\n";
            return;
          }
        } else if (i == n - 1) {
          if (b[i - 1] != mx) {
            cout << n << "\n";
            return;
          }
        } else if (b[i - 1] != mx || b[i + 1] != mx) {
          cout << (i + 1) << "\n";
          return;
        }
      }
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
