Ajmal Nayeem's submission of Mahasena | CodeChef