process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";
process.stdin.on("data", function (input) {
stdin_input += input; // Reading input from STDIN
});
process.stdin.on("end", function () {
main(stdin_input);
});
function log(..._x){
if(_x){
_x.forEach(x=>{
if(Array.isArray(x) || typeof x =="object"){
process.stdout.write(JSON.stringify(x)+"\n")
}
else
process.stdout.write(x+"\n");
})
}
}
function main(input) {
input = input.split("\n");
let count = input[0];
for(let i =0 ; i < count; i ++){
let n = input[2*i+1].split(" ")[0];
let q = input[2*i+1].split(" ")[1];
let heights = input[2*i+2].split(" ");
getPrice(n, q, heights);
}
}
function getPrice(n, q, heights){
log(n,q, heights)
}