Bhaskar Reddy's submission of ATM | CodeChef