Madhav Jha's submission of pattern13 | CodeChef