Abhijeet Krishnan's submission of Mahasena | CodeChef