Abhijeet Krishnan's submission of ATM | CodeChef