A solution for the Catalysts Coding Contest. Instructions + other training exercises can be found on the website CatCoder.