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

var tests = parseInt(readline());
for (var test = 0; test < tests; test++) {
  var size = parseInt(readline()), input = readline().split(' '), max = 0;
  input.forEach((v, i) => {
    input[i] = parseInt(v);
    if (input[i] > max)
      max = input[i];
  });
  var result = -1;
  for (var i = 0; i < size; i++) {
    if (input[i] == max) {
      if (i < size - 1) {
        if (input[i] > input[i+1]) {
          result = i + 1;
          break;
        }
      }
      if (i > 0) {
        if (input[i] > input[i-1]) {
          result = i + 1;
          break;
        }
      }
    }
  }
  print(result);
}