const rl=require("readline").createInterface(process.stdin); const g=function*(){ console.log( (yield rl.once("line",s=>g.next(s))) .split(/,/) .find(s=>s!="AC")? "Failed...": "Done!"); rl.close(); }(); g.next();