Ankur Kayal's submission of Sequence Master | CodeChef