Pawan Pratap's submission of Mahasena | CodeChef