Ranjeet Kumar's submission of Mahasena | CodeChef