export { } const lines = []; const reader = require('readline').createInterface({ input: process.stdin, output: process.stdout }) reader.on('line', (line) => { lines.push(line) }) reader.on('close', () => { const colors: string[] = lines const sumOfRed: number = colors.reduce((sum: number, color: string): number => { if (color !== 'RED') return sum return sum + 1 }, 0) const result = (sumOfRed >= 2) ? 'RED' : 'BLUE' console.log(result) })