const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: 'สวัสดีคุณ'
});

rl.prompt();

rl.on('line', (line) => {
  switch (line.trim()) {
    case 'hello':
      console.log('world!');
      break;
    default:
      console.log(`สวัสดีคุณ  '${line.trim()}'`);
      break;
  }
  rl.prompt();
})
