JavaScript const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const lines = []; rl.on("line", function (line) { lines.push(line); if (lines.length>1 && (lines.length -2) === parseInt(lines[0])) { const...