Abhinav Jain's submission of Mahasena | CodeChef