Ganesh Regoti's submission of Mahasena | CodeChef