-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = putStrLn . ((zipWith ((++) . show) [1 .. ] $ cycle ("st":"nd":"rd":replicate 7 "th")) !!) . length . foldl1 (filter . ((<) . head)) . zipWith ($) [take 1, drop 2] . replicate 2 . map ((+ 0).read) . words =<< getContents