Tomaz Hocevar's submission of WordNinjas | CodeChef