Prabhatty's submission of Mahasena | CodeChef