function Main (input) { var line = input.split("\n"); var color = line[0] == line[1] ? line[1] : line[1] == line[2] ? line[1] : line[2]; console.log(color); } Main(require("fs").readFileSync("/dev/stdin","utf8"));