Nilabja Bhattacharya's submission of ATM | CodeChef