function Main(input) { let data = input.split("\n").filter((a)=>{return a != ""}); let myHigh = data.shift().split(" ")[0]; data.push(myHigh); data.sort((a,b)=>{return parseInt(b) - parseInt(a)}); let r = data.indexOf(myHigh) + 1; let o; switch (r) { case 1: o = "1st" break; case 2: o = "2nd" case 3: o = "3rd" default: o = r + "th"; } console.log(o); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));