const count = (n) =>{ let num = 0; let az = 0; let char = 0; let space = 0; // for(let i of n){ // if( (i >= 'a' && i <='z') || (i >= 'A' && i<= 'Z') ){ // az +=1; // }else if(i>= '0' && i <= '9'){ // num +=1; // }else if(i === ' '){ // space +=1; // }else{ // char +=1; // } // } for(let i of n){ if(/[a-zA-Z]/.test(i)){ az++; }else if(/\s/.test(i)){ space++; }else if(/[0-9]/.test(i)){ num++; }else{ other++; } } console.log(az+'\n'+space+'\n'+num+'\n'+char) } const readline = require('readline'); const rl = readline.createInterface({ input:process.stdin, output:process.stdout }); rl.on('line',(line) =>{ return count(line); })