Ravi Kiran Selvam's submission of Mahasena | CodeChef