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 nrTest = readline();
const allEqual = arr => arr.every(val => val === arr[0]);
for (t = 0; t < nrTest; t++) {
    var nr = readline();
    var piranhas = [4, 4, 3, 4, 4]//readline().split(" ").map(x => parseInt(x));
    if (allEqual(piranhas)){
        print(-1);
        continue;
    }
    var dominant = -1;
    var max = Math.max(...piranhas);
    for (i = 1; i < nr; i++) {
        if (piranhas[i] === max) {
            if (piranhas[i - 1] < piranhas[i] || piranhas[i + 1] < piranhas[i]) {
                dominant = ++i;
                break;
            }
        }
    }
    print(dominant);
}