Avinash Kumar's submission of Mahasena | CodeChef