Sergey Kulik's submission of WordNinjas | CodeChef