Akshat Jain's submission of Mahasena | CodeChef