Ankur Kayal's submission of ATM | CodeChef