const row = require('fs').readFileSync('/dev/stdin','utf8').split('\n'); const column = row[0].split(' '); const a = Number(column[0]); const b = Number(column[1]); for(let i=a;i<=b; i++) { if(i%3===0 || /3/.test(i)){ console.log(i); } }