Ajmal Nayeem's submission of ATM | CodeChef